Skip to content
Permalink
Browse files

Merge pull request #2414 from splitbrain/nosafemode

removed safemode hack
  • Loading branch information...
splitbrain committed Jun 26, 2018
2 parents 95305c9 + fe22708 commit fdbbfed91f3530a7377dc2fac4e70f71029b599f
Showing with 6 additions and 341 deletions.
  1. +0 −9 conf/dokuwiki.php
  2. +3 −51 inc/io.php
  3. +0 −6 lib/plugins/config/lang/ar/lang.php
  4. +1 −7 lib/plugins/config/lang/bg/lang.php
  5. +0 −6 lib/plugins/config/lang/ca-valencia/lang.php
  6. +0 −6 lib/plugins/config/lang/ca/lang.php
  7. +0 −6 lib/plugins/config/lang/cs/lang.php
  8. +0 −8 lib/plugins/config/lang/cy/lang.php
  9. +0 −6 lib/plugins/config/lang/da/lang.php
  10. +0 −6 lib/plugins/config/lang/de-informal/lang.php
  11. +0 −6 lib/plugins/config/lang/de/lang.php
  12. +0 −6 lib/plugins/config/lang/el/lang.php
  13. +0 −8 lib/plugins/config/lang/en/lang.php
  14. +0 −6 lib/plugins/config/lang/eo/lang.php
  15. +0 −6 lib/plugins/config/lang/es/lang.php
  16. +0 −6 lib/plugins/config/lang/eu/lang.php
  17. +0 −6 lib/plugins/config/lang/fa/lang.php
  18. +1 −7 lib/plugins/config/lang/fi/lang.php
  19. +0 −6 lib/plugins/config/lang/fr/lang.php
  20. +0 −6 lib/plugins/config/lang/gl/lang.php
  21. +0 −6 lib/plugins/config/lang/he/lang.php
  22. +0 −6 lib/plugins/config/lang/hr/lang.php
  23. +0 −6 lib/plugins/config/lang/hu/lang.php
  24. +0 −6 lib/plugins/config/lang/ia/lang.php
  25. +0 −6 lib/plugins/config/lang/id-ni/lang.php
  26. +0 −6 lib/plugins/config/lang/it/lang.php
  27. +0 −6 lib/plugins/config/lang/ja/lang.php
  28. +0 −6 lib/plugins/config/lang/ko/lang.php
  29. +0 −6 lib/plugins/config/lang/la/lang.php
  30. +0 −6 lib/plugins/config/lang/lv/lang.php
  31. +0 −6 lib/plugins/config/lang/mr/lang.php
  32. +0 −6 lib/plugins/config/lang/nl/lang.php
  33. +0 −6 lib/plugins/config/lang/no/lang.php
  34. +0 −6 lib/plugins/config/lang/pl/lang.php
  35. +0 −6 lib/plugins/config/lang/pt-br/lang.php
  36. +0 −6 lib/plugins/config/lang/pt/lang.php
  37. +0 −6 lib/plugins/config/lang/ro/lang.php
  38. +0 −6 lib/plugins/config/lang/ru/lang.php
  39. +0 −6 lib/plugins/config/lang/sk/lang.php
  40. +0 −6 lib/plugins/config/lang/sl/lang.php
  41. +0 −6 lib/plugins/config/lang/sq/lang.php
  42. +0 −6 lib/plugins/config/lang/sr/lang.php
  43. +0 −6 lib/plugins/config/lang/sv/lang.php
  44. +1 −5 lib/plugins/config/lang/tr/lang.php
  45. +0 −6 lib/plugins/config/lang/uk/lang.php
  46. +0 −6 lib/plugins/config/lang/zh-tw/lang.php
  47. +0 −6 lib/plugins/config/lang/zh/lang.php
  48. +0 −6 lib/plugins/config/settings/config.metadata.php
@@ -169,12 +169,3 @@
$conf['proxy']['pass'] = '';
$conf['proxy']['ssl'] = 0;
$conf['proxy']['except'] = '';
// Safemode Hack - read http://www.dokuwiki.org/config:safemodehack !
$conf['safemodehack'] = 0;
$conf['ftp']['host'] = 'localhost';
$conf['ftp']['port'] = '21';
$conf['ftp']['user'] = 'user';
$conf['ftp']['pass'] = 'password';
$conf['ftp']['root'] = '/home/user/htdocs';
@@ -16,7 +16,6 @@
* $data[0] ns: The colon separated namespace path minus the trailing page name.
* $data[1] ns_type: 'pages' or 'media' namespace tree.
*
* @todo use safemode hack
* @param string $id - a pageid, the namespace of that id will be tried to deleted
* @param string $basedir - the config name of the type to delete (datadir or mediadir usally)
* @return bool - true if at least one namespace was deleted
@@ -400,8 +399,6 @@ function io_deleteFromFile($file,$badline,$regex=false){
*/
function io_lock($file){
global $conf;
// no locking if safemode hack
if($conf['safemodehack']) return;
$lockDir = $conf['lockdir'].'/'.md5($file);
@ignore_user_abort(1);
@@ -428,8 +425,6 @@ function io_lock($file){
*/
function io_unlock($file){
global $conf;
// no locking if safemode hack
if($conf['safemodehack']) return;
$lockDir = $conf['lockdir'].'/'.md5($file);
@rmdir($lockDir);
@@ -508,14 +503,9 @@ function io_mkdir_p($target){
if (file_exists($target) && !is_dir($target)) return 0;
//recursion
if (io_mkdir_p(substr($target,0,strrpos($target,'/')))){
if($conf['safemodehack']){
$dir = preg_replace('/^'.preg_quote(fullpath($conf['ftp']['root']),'/').'/','', $target);
return io_mkdir_ftp($dir);
}else{
$ret = @mkdir($target,$conf['dmode']); // crawl back up & create dir tree
if($ret && !empty($conf['dperm'])) chmod($target, $conf['dperm']);
return $ret;
}
$ret = @mkdir($target,$conf['dmode']); // crawl back up & create dir tree
if($ret && !empty($conf['dperm'])) chmod($target, $conf['dperm']);
return $ret;
}
return 0;
}
@@ -570,44 +560,6 @@ function io_rmdir($path, $removefiles = false) {
return false;
}
/**
* Creates a directory using FTP
*
* This is used when the safemode workaround is enabled
*
* @author <andi@splitbrain.org>
*
* @param string $dir name of the new directory
* @return false|string
*/
function io_mkdir_ftp($dir){
global $conf;
if(!function_exists('ftp_connect')){
msg("FTP support not found - safemode workaround not usable",-1);
return false;
}
$conn = @ftp_connect($conf['ftp']['host'],$conf['ftp']['port'],10);
if(!$conn){
msg("FTP connection failed",-1);
return false;
}
if(!@ftp_login($conn, $conf['ftp']['user'], conf_decodeString($conf['ftp']['pass']))){
msg("FTP login failed",-1);
return false;
}
//create directory
$ok = @ftp_mkdir($conn, $dir);
//set permissions
@ftp_site($conn,sprintf("CHMOD %04o %s",$conf['dmode'],$dir));
@ftp_close($conn);
return $ok;
}
/**
* Creates a unique temporary directory and returns
* its path.
@@ -142,12 +142,6 @@
$lang['proxy____pass'] = 'كلمة سر الوكيل';
$lang['proxy____ssl'] = 'استخدم ssl للاتصال بالوكيل';
$lang['proxy____except'] = 'تعبير شرطي لمقابلة العناوين التي ستتجاوز البروكسي.';
$lang['safemodehack'] = 'مكّن hack الوضع الآمن';
$lang['ftp____host'] = 'خادوم FTP ل hack الوضع الآمن';
$lang['ftp____port'] = 'منفذ FTP ل hack الوضع الآمن';
$lang['ftp____user'] = 'اسم مستخدم FTP ل hack الوضع الآمن';
$lang['ftp____pass'] = 'كلمة سر FTP ل hack الوضع الآمن';
$lang['ftp____root'] = 'دليل الجذر ل FTP لأجل hack الوضع الآمن';
$lang['license_o_'] = 'غير مختار';
$lang['typography_o_0'] = 'لاشيء';
$lang['typography_o_1'] = 'استبعاد الاقتباس المفرد';
@@ -2,7 +2,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author Nikolay Vladimirov <nikolay@vladimiroff.com>
* @author Viktor Usunov <usun0v@mail.bg>
* @author Kiril <neohidra@gmail.com>
@@ -145,12 +145,6 @@
$lang['proxy____pass'] = 'Парола за проксито';
$lang['proxy____ssl'] = 'Ползване на SSL при свързване с проксито';
$lang['proxy____except'] = 'Регулярен израз определящ за кои URL адреси да не се ползва прокси сървър.';
$lang['safemodehack'] = 'Ползване на хака safemode';
$lang['ftp____host'] = 'FTP сървър за хака safemode';
$lang['ftp____port'] = 'FTP порт за хака safemode';
$lang['ftp____user'] = 'FTP потребител за хака safemode';
$lang['ftp____pass'] = 'FTP парола за хака safemode';
$lang['ftp____root'] = 'FTP главна директория за хака safemode';
$lang['license_o_'] = 'Нищо не е избрано';
$lang['typography_o_0'] = 'без';
$lang['typography_o_1'] = 'с изключение на единични кавички';
@@ -128,12 +128,6 @@
$lang['proxy____user'] = 'Nom d\'usuari del proxy';
$lang['proxy____pass'] = 'Contrasenya del proxy';
$lang['proxy____ssl'] = 'Utilisar SSL per a conectar al proxy';
$lang['safemodehack'] = 'Activar \'hack\' de modo segur';
$lang['ftp____host'] = 'Servidor FTP per al \'hack\' de modo segur';
$lang['ftp____port'] = 'Port FTP per al \'hack\' de modo segur';
$lang['ftp____user'] = 'Nom de l\'usuari per al \'hack\' de modo segur';
$lang['ftp____pass'] = 'Contrasenya FTP per al \'hack\' de modo segur';
$lang['ftp____root'] = 'Directori base FTP per al \'hack\' de modo segur';
$lang['license_o_'] = 'Cap triada';
$lang['typography_o_0'] = 'cap';
$lang['typography_o_1'] = 'Excloure cometes simples';
@@ -139,12 +139,6 @@
$lang['proxy____user'] = 'Nom d\'usuari del servidor intermediari';
$lang['proxy____pass'] = 'Contrasenya del servidor intermediari';
$lang['proxy____ssl'] = 'Utilitza SSL per connectar amb el servidor intermediari';
$lang['safemodehack'] = 'Utilitza el hack per a safemode';
$lang['ftp____host'] = 'Servidor FTP per al hack de safemode';
$lang['ftp____port'] = 'Port FTP per al hack de safemode';
$lang['ftp____user'] = 'Nom d\'usuari FTP per al hack de safemode';
$lang['ftp____pass'] = 'Contrasenya FTP per al hack de safemode';
$lang['ftp____root'] = 'Directori arrel FTP per al hack de safemode';
$lang['license_o_'] = 'Cap selecció';
$lang['typography_o_0'] = 'cap';
$lang['typography_o_1'] = 'només cometes dobles';
@@ -177,12 +177,6 @@
$lang['proxy____pass'] = 'Proxy heslo';
$lang['proxy____ssl'] = 'Použít SSL při připojení k proxy';
$lang['proxy____except'] = 'Regulární výrazy pro URL, pro které bude přeskočena proxy.';
$lang['safemodehack'] = 'Zapnout safemode hack';
$lang['ftp____host'] = 'FTP server pro safemode hack';
$lang['ftp____port'] = 'FTP port pro safemode hack';
$lang['ftp____user'] = 'FTP uživatelské jméno pro safemode hack';
$lang['ftp____pass'] = 'FTP heslo pro safemode hack';
$lang['ftp____root'] = 'FTP kořenový adresář pro safemode hack';
$lang['license_o_'] = 'Nic nevybráno';
$lang['typography_o_0'] = 'vypnuto';
$lang['typography_o_1'] = 'Pouze uvozovky';
@@ -185,14 +185,6 @@
$lang['proxy____ssl'] = 'Defnyddio SSL i gysylltu â\'r procsi';
$lang['proxy____except'] = 'Mynegiad rheolaidd i gydweddu URL ar gyfer y procsi a ddylai cael eu hanwybyddu.';
/* Safemode Hack */
$lang['safemodehack'] = 'Galluogi safemode hack';
$lang['ftp____host'] = 'Gweinydd FTP safemode hack';
$lang['ftp____port'] = 'Porth FTP safemode hack';
$lang['ftp____user'] = 'Defnyddair FTP safemode hack';
$lang['ftp____pass'] = 'Cyfrinair FTP safemode hack';
$lang['ftp____root'] = 'Gwraiddffolder FTP safemode hack';
/* License Options */
$lang['license_o_'] = 'Dim wedi\'i ddewis';
@@ -150,12 +150,6 @@
$lang['proxy____pass'] = 'Proxy-kodeord';
$lang['proxy____ssl'] = 'Brug SSL til at forbinde til proxy';
$lang['proxy____except'] = 'Regular expression til at matche URL\'er for hvilke proxier der skal ignores';
$lang['safemodehack'] = 'Slå "safemode hack" til ';
$lang['ftp____host'] = 'FTP-server til "safemode hack"';
$lang['ftp____port'] = 'FTP-port til "safemode hack"';
$lang['ftp____user'] = 'FTP-brugernavn til "safemode hack"';
$lang['ftp____pass'] = 'FTP-adgangskode til "safemode hack"';
$lang['ftp____root'] = 'FTP-rodmappe til "safemode hack"';
$lang['license_o_'] = 'Ingen valgt';
$lang['typography_o_0'] = 'ingen';
$lang['typography_o_1'] = 'Kun gåseøjne';
@@ -157,12 +157,6 @@
$lang['proxy____pass'] = 'Passwort von dem Proxybenutzer';
$lang['proxy____ssl'] = 'SSL verwenden um auf den Proxy zu zugreifen';
$lang['proxy____except'] = 'Regulärer Ausdruck um Adressen zu beschreiben, für die kein Proxy verwendet werden soll';
$lang['safemodehack'] = 'Aktiviere safemode Hack';
$lang['ftp____host'] = 'FTP Server für safemode Hack';
$lang['ftp____port'] = 'FTP Port für safemode Hack';
$lang['ftp____user'] = 'FTP Benutzername für safemode Hack';
$lang['ftp____pass'] = 'FTP Passwort für safemode Hack';
$lang['ftp____root'] = 'FTP Wurzelverzeichnis für Safemodehack';
$lang['license_o_'] = 'Nichts ausgewählt';
$lang['typography_o_0'] = 'nichts';
$lang['typography_o_1'] = 'ohne einfache Anführungszeichen';
@@ -174,12 +174,6 @@
$lang['proxy____pass'] = 'Proxy Passwort';
$lang['proxy____ssl'] = 'SSL bei Verbindung zum Proxy verwenden';
$lang['proxy____except'] = 'Regulärer Ausdruck für URLs, bei denen kein Proxy verwendet werden soll';
$lang['safemodehack'] = 'Safemodehack verwenden';
$lang['ftp____host'] = 'FTP-Host für Safemodehack';
$lang['ftp____port'] = 'FTP-Port für Safemodehack';
$lang['ftp____user'] = 'FTP Benutzername für Safemodehack';
$lang['ftp____pass'] = 'FTP Passwort für Safemodehack';
$lang['ftp____root'] = 'FTP Wurzelverzeichnis für Safemodehack';
$lang['license_o_'] = 'Keine gewählt';
$lang['typography_o_0'] = 'keine';
$lang['typography_o_1'] = 'ohne einfache Anführungszeichen';
@@ -149,12 +149,6 @@
$lang['proxy____pass'] = 'Κωδικός χρήστη Proxy';
$lang['proxy____ssl'] = 'Χρήση ssl για σύνδεση με διακομιστή Proxy';
$lang['proxy____except'] = 'Regular expression για να πιάνει τα URLs για τα οποία θα παρακάμπτεται το proxy.';
$lang['safemodehack'] = 'Ενεργοποίηση safemode hack';
$lang['ftp____host'] = 'Διακομιστής FTP για safemode hack';
$lang['ftp____port'] = 'Θύρα FTP για safemode hack';
$lang['ftp____user'] = 'Όνομα χρήστη FTP για safemode hack';
$lang['ftp____pass'] = 'Κωδικός χρήστη FTP για safemode hack';
$lang['ftp____root'] = 'Αρχικός φάκελος FTP για safemode hack';
$lang['license_o_'] = 'Δεν επελέγει άδεια';
$lang['typography_o_0'] = 'κανένα';
$lang['typography_o_1'] = 'μόνο διπλά εισαγωγικά';
@@ -202,14 +202,6 @@
$lang['proxy____ssl'] = 'Use SSL to connect to proxy';
$lang['proxy____except'] = 'Regular expression to match URLs for which the proxy should be skipped.';
/* Safemode Hack */
$lang['safemodehack'] = 'Enable safemode hack';
$lang['ftp____host'] = 'FTP server for safemode hack';
$lang['ftp____port'] = 'FTP port for safemode hack';
$lang['ftp____user'] = 'FTP user name for safemode hack';
$lang['ftp____pass'] = 'FTP password for safemode hack';
$lang['ftp____root'] = 'FTP root directory for safemode hack';
/* License Options */
$lang['license_o_'] = 'None chosen';
@@ -152,12 +152,6 @@
$lang['proxy____pass'] = 'Pasvorto ĉe la "Proxy"';
$lang['proxy____ssl'] = 'Uzi SSL por konekti al la "Proxy"';
$lang['proxy____except'] = 'Regula esprimo por URL-oj, kiujn la servilo preterrigardu.';
$lang['safemodehack'] = 'Ebligi sekuran modon';
$lang['ftp____host'] = 'FTP-a servilo por sekura modo';
$lang['ftp____port'] = 'FTP-a pordo por sekura modo';
$lang['ftp____user'] = 'FTP-a uzantonomo por sekura modo';
$lang['ftp____pass'] = 'FTP-a pasvorto por sekura modo';
$lang['ftp____root'] = 'FTP-a superuzanta (root) subdosierujo por sekura modo';
$lang['license_o_'] = 'Nenio elektita';
$lang['typography_o_0'] = 'nenio';
$lang['typography_o_1'] = 'Nur duoblaj citiloj';
@@ -177,12 +177,6 @@
$lang['proxy____pass'] = 'Contraseña para el servidor Proxy';
$lang['proxy____ssl'] = 'Usar ssl para conectarse al servidor Proxy';
$lang['proxy____except'] = 'Expresiones regulares para encontrar URLs que el proxy debería omitir.';
$lang['safemodehack'] = 'Habilitar edición (hack) de modo seguro';
$lang['ftp____host'] = 'Nombre del servidor FTP para modo seguro';
$lang['ftp____port'] = 'Puerto del servidor FTP para modo seguro';
$lang['ftp____user'] = 'Nombre de usuario para el servidor FTP para modo seguro';
$lang['ftp____pass'] = 'Contraseña para el servidor FTP para modo seguro';
$lang['ftp____root'] = 'Directorio raiz para el servidor FTP para modo seguro';
$lang['license_o_'] = 'No se eligió ninguna';
$lang['typography_o_0'] = 'ninguno';
$lang['typography_o_1'] = 'Dobles comillas solamente';
@@ -135,12 +135,6 @@
$lang['proxy____pass'] = 'Proxyaren pasahitza ';
$lang['proxy____ssl'] = 'Erabili SSL Proxyra konektatzeko';
$lang['proxy____except'] = 'URLak detektatzeko espresio erregularra, zeinentzat Proxy-a sahiestu beharko litzatekeen.';
$lang['safemodehack'] = 'Gaitu modu segurua hack-a';
$lang['ftp____host'] = 'FTP zerbitzaria modu seguruarentzat';
$lang['ftp____port'] = 'FTP portua modu seguruarentzat';
$lang['ftp____user'] = 'FTP erabiltzailea modu seguruarentzat';
$lang['ftp____pass'] = 'FTP pasahitza modu seguruarentzat';
$lang['ftp____root'] = 'FTP erro direktorioa modu seguruarentzat';
$lang['license_o_'] = 'Bat ere ez hautaturik';
$lang['typography_o_0'] = 'ezer';
$lang['typography_o_1'] = 'Komatxo bikoitzak bakarrik';
@@ -153,12 +153,6 @@
$lang['proxy____pass'] = 'گذرواژهي پروکسی';
$lang['proxy____ssl'] = 'استفاده از SSL برای اتصال به پروکسی';
$lang['proxy____except'] = 'عبارت منظم برای تطبیق با URLها برای این‌که دریابیم که از روی چه پروکسی‌ای باید بپریم!';
$lang['safemodehack'] = 'فعال کردن safemode hack';
$lang['ftp____host'] = 'آدرس FTP برای safemode hack';
$lang['ftp____port'] = 'پورت FTP برای safemode hack';
$lang['ftp____user'] = 'نام کاربری FTP برای safemode hack';
$lang['ftp____pass'] = 'گذرواژه‌ی FTP برای safemode hack';
$lang['ftp____root'] = 'شاخه‌ی FTP برای safemode hack';
$lang['license_o_'] = 'هیچ کدام';
$lang['typography_o_0'] = 'هیچ';
$lang['typography_o_1'] = 'حذف کردن single-quote';
@@ -2,7 +2,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author otto@valjakko.net
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
@@ -148,12 +148,6 @@
$lang['proxy____pass'] = 'Proxy salasana';
$lang['proxy____ssl'] = 'Käytä ssl-yhteyttä kytkeytyäksesi proxy-palvelimeen';
$lang['proxy____except'] = 'Säännönmukainen lause, URLiin, jolle proxy ohitetaan.';
$lang['safemodehack'] = 'Käytä safemode kiertoa';
$lang['ftp____host'] = 'FTP-palvelin safemode kiertoa varten';
$lang['ftp____port'] = 'FTP-portti safemode kiertoa varten';
$lang['ftp____user'] = 'FTP-käyttäjä safemode kiertoa varten';
$lang['ftp____pass'] = 'FTP-salasana safemode kiertoa varten';
$lang['ftp____root'] = 'FTP-juurihakemisto safemode kiertoa varten';
$lang['license_o_'] = 'ei mitään valittuna';
$lang['typography_o_0'] = 'ei mitään';
$lang['typography_o_1'] = 'ilman yksinkertaisia lainausmerkkejä';
@@ -182,12 +182,6 @@
$lang['proxy____pass'] = 'Mandataire - Mot de passe';
$lang['proxy____ssl'] = 'Mandataire - Utilisation de SSL';
$lang['proxy____except'] = 'Mandataire - Expression régulière de test des URLs pour lesquelles le mandataire (proxy) ne doit pas être utilisé.';
$lang['safemodehack'] = 'Activer l\'option Mode sans échec';
$lang['ftp____host'] = 'FTP / Mode sans échec - Serveur hôte';
$lang['ftp____port'] = 'FTP / Mode sans échec - Port';
$lang['ftp____user'] = 'FTP / Mode sans échec - Identifiant';
$lang['ftp____pass'] = 'FTP / Mode sans échec - Mot de passe';
$lang['ftp____root'] = 'FTP / Mode sans échec - Répertoire racine';
$lang['license_o_'] = 'Aucune choisie';
$lang['typography_o_0'] = 'aucun';
$lang['typography_o_1'] = 'guillemets uniquement';
@@ -144,12 +144,6 @@
$lang['proxy____pass'] = 'Contrasinal do Proxy';
$lang['proxy____ssl'] = 'Utilizar ssl para conectar ao Proxy';
$lang['proxy____except'] = 'Expresión regular para atopar URLs que deban ser omitidas polo Proxy.';
$lang['safemodehack'] = 'Activar hack de modo seguro (safemode)';
$lang['ftp____host'] = 'Servidor FTP para o hack de modo seguro (safemode)';
$lang['ftp____port'] = 'Porto FTP para o hack de modo seguro(safemode)';
$lang['ftp____user'] = 'Nome de usuario FTP para o hack de modo seguro(safemode)';
$lang['ftp____pass'] = 'Contrasinal FTP para o hack de modo seguro(safemode)';
$lang['ftp____root'] = 'Directorio raigaña do FTP para o hack de modo seguro(safemode)';
$lang['license_o_'] = 'Non se escolleu nada';
$lang['typography_o_0'] = 'ningunha';
$lang['typography_o_1'] = 'Só dobres aspas';
Oops, something went wrong.

0 comments on commit fdbbfed

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.