dokuwiki / translate.dokuwiki.org

Web based tool to create and update translation patches for DokuWiki and DokuWiki plugins.
MIT License
8 stars 2 forks source link

dokuwiki repo is not updated due to unclear 'no code execution allowed' error #109

Closed Klap-in closed 1 year ago

Klap-in commented 1 year ago

During language update at repository update, it breaks on ckb/lang.php line 98. Message: No code execution allowed.

https://github.com/dokuwiki/dokuwiki/blob/master/inc/lang/ckb/lang.php#L98

$lang['js']['nosmblinks']      = 'لینک کردن بە هاوبەشیەکانی Windows تەنها لە Microsoft Internet Explorer کاردەکات.\nتۆ هێشتا دەتوانیت لینکەکە کۆپی و پەیست بکەیت.';

Needs further investigation to fiddle out why this is interpret as code execution https://github.com/dokufreaks/dokuwiki-translation/blob/a490a4630c6454dc2ab1d63da624d97a56402e98/src/org/dokuwiki/translatorBundle/Services/Language/LanguageFileParser.php#L116

https://github.com/dokufreaks/dokuwiki-translation/blob/a490a4630c6454dc2ab1d63da624d97a56402e98/src/org/dokuwiki/translatorBundle/Services/Language/LanguageFileParser.php#L310-L329

(PS: as contact email I filled in my email address, as default no address was set. Therefore, we did not get notified about core dokuwiki)

splitbrain commented 1 year ago

Weird. Should we drop the line from the language file as a quick fix?

Next step would be to add it to the unit tests to be able to debug it?

Klap-in commented 1 year ago

Looking deeper, shows that for the dokuwiki repo, the parent directories of the language files were not printed, while for dokuwiki repo these differ, but for plugins/templates not. I changed the error messages, such that the error becomes now: ERROR [app] error during repository update (App\Services\Language\LanguageParseException: No code execution allowed. ) in file: lib/plugins/config/lang/ckb/lang.php(98) Fixed with https://github.com/dokuwiki/dokuwiki/commit/1aa2c37f55bdcf5f41c495ec3b23ea04fa88a14b

Klap-in commented 1 year ago

Fixed in #112