Compare commits

...

12 commits

Author SHA1 Message Date
1f5c95b382
[MobileMenu] Prevent trying to fetch unset array entries
Some checks failed
PHP Code Style / PHP CodeSniffer (push) Has been cancelled
Linux Unit Tests / PHP 7.4 (push) Has been cancelled
Linux Unit Tests / PHP 8.0 (push) Has been cancelled
Linux Unit Tests / PHP 8.1 (push) Has been cancelled
Linux Unit Tests / PHP 8.2 (push) Has been cancelled
Linux Unit Tests / PHP 8.3 (push) Has been cancelled
Windows Unit Tests / PHP 7.4 (push) Has been cancelled
Windows Unit Tests / PHP 8.0 (push) Has been cancelled
Windows Unit Tests / PHP 8.1 (push) Has been cancelled
Windows Unit Tests / PHP 8.2 (push) Has been cancelled
Windows Unit Tests / PHP 8.3 (push) Has been cancelled
Auto-Fix code / autofix (push) Has been cancelled
Update deleted files / Update deleted files (push) Has been cancelled
2024-10-04 19:50:07 +02:00
Andreas Gohr
e44b94a4bd Revert "use a dispatcher to access static image files"
This reverts commit 944e9ba725.

It was accidentally pused to master before review. A PR with a revert
for the revert will be pushed shortly.
2024-09-08 18:15:53 +02:00
Andreas Gohr
944e9ba725 use a dispatcher to access static image files
This makes it possible to replace default images in an update safe way.
It also addresses the issue raised in dokuwiki/docker#16

A .htaccess rewrite catches any direct accesses that might come in from
plugins.
2024-09-08 18:09:28 +02:00
Gerrit Uitslag
6de67ec6f9
Merge pull request #4315 from dokuwiki-translate/lang_update_931_1724214661
Translation update (ko)
2024-08-21 11:09:31 +02:00
nakky
598ce738f4 translation update 2024-08-21 06:36:13 +02:00
Andreas Gohr
a09f9f21cb
Merge pull request #4294 from dokuwiki/woltlab
Support Woltlab password hashes
2024-08-05 13:46:19 +02:00
Andreas Gohr
cf88f10b93
Merge pull request #4301 from hauk92/loginlocaltime
Use date in install.php
2024-08-05 13:45:32 +02:00
Kazutaka Miyasaka
b1a9a7addb Fix stored XSS vulnerability via do=export_metadata #4305
This prevents metadata export in general and also ensures the the
temporary $doc property in the metadata renderer is cleared in
document_end
2024-08-05 08:18:33 +02:00
hauk92
234bbfafd8 Use date in install.php 2024-07-26 22:30:21 +02:00
Phy
df992f97cb
Merge pull request #4299 from dokuwiki-translate/lang_update_906_1721252389
Translation update (tr)
2024-07-18 10:36:15 -04:00
Ekin
f4faa2178c translation update 2024-07-17 23:40:57 +02:00
Andreas Gohr
07a871e686 Support Woltlab password hashes
The Woltlab forum software uses bcrypt passwords, but prefixes them with
"Bcrypt:". This adds support for this in our PassHash class.
2024-06-25 11:07:37 +02:00
10 changed files with 48 additions and 2 deletions

View file

@ -143,4 +143,8 @@ class auth_password_test extends DokuWikiTest {
}
}
function test_verifyPassword_Woltlab()
{
$this->assertTrue(auth_verifyPassword('zQ9ZwsTvgufN', 'Bcrypt:$2y$12$ygz.4TeGn/NXEcXIE0pyge4lJyuSMqRdDPT5dW469lODb.HswSzjW'));
}
}

View file

@ -86,6 +86,9 @@ class Export extends AbstractAction
$headers['Content-Type'] = 'text/html; charset=utf-8';
$output = p_wiki_xhtml($ID, $REV, false);
break;
case 'metadata':
// metadata should not be exported
break;
default:
$output = p_cached_output(wikiFN($ID, $REV), $mode, $ID);
$headers = p_get_metadata($ID, "format $mode");

View file

@ -77,6 +77,11 @@ class MobileMenu implements MenuInterface
$html .= '<optgroup label="' . $lang[$tools . '_tools'] . '">';
foreach ($items as $item) {
$params = $item->getParams();
// FIXME: $params['do'] is sometimes not set, it might be a symptom of some bug.
// Such entries are silently skipped instead of generating bogus HTML code.
if ( ! array_key_exists('do', $params) ) continue;
$html .= '<option value="' . $params['do'] . '">';
$html .= hsc($item->getLabel());
$html .= '</option>';

View file

@ -79,7 +79,10 @@ class PassHash
$salt = $m[1];
} elseif (preg_match('/^\$2([abxy])\$(.{2})\$/', $hash, $m)) {
$method = 'bcrypt';
$salt = $hash;
$salt = $hash;
} elseif (str_starts_with($hash, 'Bcrypt:$2')) {
$method = 'woltlab';
$salt = substr($hash, 7);
} elseif (str_starts_with($hash, '{SSHA}')) {
$method = 'ssha';
$salt = substr(base64_decode(substr($hash, 6)), 20);
@ -685,6 +688,21 @@ class PassHash
return crypt($clear, $salt);
}
/**
* Password hashing method 'woltlab'
*
* Woltlab forums use a bcrypt hash with a custom prefix.
*
* @param $clear
* @param $salt
* @return string
* @throws \Exception
*/
public function hash_woltlab($clear, $salt = null)
{
return 'Bcrypt:' . $this->hash_bcrypt($clear, $salt);
}
/**
* Password hashing method SHA-2
*

View file

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author nakky <nakky@naver.com>
* @author merefox retronica <merefox@naver.com>
* @author take <take@ruu.kr>
* @author merefox <admin@homerecz.com>
@ -156,6 +157,8 @@ $lang['profdeleted'] = '당신의 사용자 계정이 이 위키에서
$lang['profconfdelete'] = '이 위키에서 내 계정을 제거하고 싶습니다. <br/> 이 행동은 되돌릴 수 없습니다.';
$lang['profconfdeletemissing'] = '선택하지 않은 확인 상자를 확인';
$lang['proffail'] = '사용자 프로필이 업데이트되지 않았습니다.';
$lang['proftokenlegend'] = '인증 토큰';
$lang['proftokengenerate'] = '토큰 재설정';
$lang['pwdforget'] = '비밀번호를 잊으셨나요? 비밀번호를 재설정하세요';
$lang['resendna'] = '이 위키는 비밀번호 재설정을 지원하지 않습니다.';
$lang['resendpwd'] = '다음으로 새 비밀번호 보내기';

View file

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Ekin <ata.ekin@windowslive.com>
* @author Eren <bosshyapma@protonmail.com>
* @author Hakan <hakandursun2009@gmail.com>
* @author mahir <mahirtakak@gmail.com>
@ -152,6 +153,8 @@ $lang['profdeleted'] = 'Bu wiki\'den hesabınız silindi';
$lang['profconfdelete'] = 'Bu wiki\'den hesabımı silmek istiyorum. <br/>Bu işlem geri alınamaz';
$lang['profconfdeletemissing'] = 'Onay kutusu işaretlenmedi';
$lang['proffail'] = 'Kullanıcı bilgileri güncellenmedi.';
$lang['proftokenlegend'] = 'Doğrulama Belirteci';
$lang['proftokengenerate'] = 'Sıfırlama Belirteci';
$lang['pwdforget'] = 'Parolanızı mı unuttunuz? Yeni bir parola alın';
$lang['resendna'] = 'Bu wiki parolayı tekrar göndermeyi desteklememektedir.';
$lang['resendpwd'] = 'İçin yeni şifre belirle';
@ -222,6 +225,7 @@ $lang['created'] = 'oluşturuldu';
$lang['restored'] = 'eski sürüme dönüldü (%s)';
$lang['external_edit'] = 'Dışarıdan düzenle';
$lang['summary'] = 'Özeti düzenle';
$lang['unknowndate'] = 'Bilinmeyen tarih';
$lang['noflash'] = 'Bu içeriği göstermek için <a href="http://get.adobe.com/flashplayer">Adobe Flash Eklentisi</a> gerekmektedir.';
$lang['download'] = 'Parçacığı indir';
$lang['tools'] = 'Alet';
@ -362,3 +366,6 @@ $lang['plainhtml'] = 'Yalın HTML';
$lang['wikimarkup'] = 'Wiki Biçimlendirmesi';
$lang['email_signature_text'] = 'Bu e-posta aşağıdaki DokuWiki tarafından otomatik olarak oluşturulmuştur
@DOKUWIKIURL@';
$lang['log_file_too_large'] = 'Kayıt dosyası fazla büyük. Önceki sıralar atlandı!';
$lang['log_file_failed_to_open'] = 'Kayıt dosyasıılamadı.';
$lang['log_file_failed_to_read'] = 'Bu kaydı okurken bir sorun oluştu.';

View file

@ -108,6 +108,8 @@ class Doku_Renderer_metadata extends Doku_Renderer
if (!isset($this->meta['date']['modified'])) {
$this->meta['date']['modified'] = filemtime(wikiFN($ID));
}
$this->doc = '';
}
/**

View file

@ -378,7 +378,7 @@ function store_data($d)
$d['policy'] = (int)$d['policy'];
// create local.php
$now = gmdate('r');
$now = date('r');
$output = <<<EOT
<?php
/**

View file

@ -3,6 +3,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Ekin <ata.ekin@windowslive.com>
* @author ilker rifat kapaç <irifat@gmail.com>
*/
$lang['bindpw'] = 'Üstteki kullanıcının şifresi';
$lang['referrals_o_-1'] = 'varsayılanı kullan';

View file

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Ekin <ata.ekin@windowslive.com>
* @author Eren <bosshyapma@protonmail.com>
* @author Hakan <hakandursun2009@gmail.com>
* @author mahir <mahirtakak@gmail.com>
@ -35,6 +36,7 @@ $lang['_anti_spam'] = 'Spam Engelleme Ayarları';
$lang['_editing'] = 'Sayfa Yazımı Ayarları';
$lang['_links'] = 'Bağlantı Ayarları';
$lang['_media'] = 'Medya Ayarları';
$lang['_notifications'] = 'Bildirim';
$lang['_advanced'] = 'Gelişmiş Ayarlar';
$lang['_network'] = 'Ağ Ayarları';
$lang['_msg_setting_undefined'] = 'Ayar üstverisi yok.';