diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_encryption/appinfo/app.php | 6 | ||||
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 5 | ||||
-rw-r--r-- | apps/files_encryption/l10n/de_DE.php | 12 | ||||
-rw-r--r-- | apps/files_encryption/l10n/ja_JP.php | 4 | ||||
-rw-r--r-- | apps/files_encryption/l10n/nl.php | 4 | ||||
-rw-r--r-- | apps/files_encryption/l10n/pt_BR.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/js/settings.js | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/de_DE.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/nl.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/lib/connection.php | 12 | ||||
-rw-r--r-- | apps/user_ldap/lib/helper.php | 8 |
11 files changed, 56 insertions, 6 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index d9bb4d5e74e..99bdc2c2470 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -25,6 +25,12 @@ stream_wrapper_register('crypt', 'OCA\Encryption\Stream'); // check if we are logged in if (OCP\User::isLoggedIn()) { + + // ensure filesystem is loaded + if(!\OC\Files\Filesystem::$loaded) { + \OC_Util::setupFS(); + } + $view = new OC_FilesystemView('/'); $session = new \OCA\Encryption\Session($view); diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index eb9a2600d70..d1b08a0b978 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -46,6 +46,11 @@ class Hooks { $view = new \OC_FilesystemView('/');
+ // ensure filesystem is loaded
+ if(!\OC\Files\Filesystem::$loaded) {
+ \OC_Util::setupFS($params['uid']);
+ }
+
$util = new Util($view, $params['uid']);
// setup user, if user not ready force relogin
diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php index 5ab283ccab3..884ed3c50b0 100644 --- a/apps/files_encryption/l10n/de_DE.php +++ b/apps/files_encryption/l10n/de_DE.php @@ -1,9 +1,19 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Der Wiederherstellungsschlüssel wurde erfolgreich aktiviert.", +"Could not enable recovery key. Please check your recovery key password!" => "Der Wiederherstellungsschlüssel konnte nicht aktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!", +"Recovery key successfully disabled" => "Der Wiederherstellungsschlüssel wurde erfolgreich deaktiviert.", +"Could not disable recovery key. Please check your recovery key password!" => "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!", "Password successfully changed." => "Das Passwort wurde erfolgreich geändert.", "Could not change the password. Maybe the old password was not correct." => "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort nicht richtig.", "Saving..." => "Speichern...", "Encryption" => "Verschlüsselung", +"Recovery account password" => "Account-Passwort wiederherstellen", "Enabled" => "Aktiviert", "Disabled" => "Deaktiviert", -"Change Password" => "Passwort ändern" +"Old Recovery account password" => "Altes Passwort für die Account-Wiederherstellung", +"New Recovery account password" => "Neues Passwort für die Account-Wiederherstellung", +"Change Password" => "Passwort ändern", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Durch die Aktivierung dieser Option haben Sie die Möglichkeit, wieder auf Ihre verschlüsselten Dateien zugreifen zu können, wenn Sie Ihr Passwort verloren haben.", +"File recovery settings updated" => "Die Einstellungen für die Dateiwiederherstellung wurden aktualisiert.", +"Could not update file recovery" => "Die Dateiwiederherstellung konnte nicht aktualisiert werden." ); diff --git a/apps/files_encryption/l10n/ja_JP.php b/apps/files_encryption/l10n/ja_JP.php index 7f906ae5c03..6d2d3e249c0 100644 --- a/apps/files_encryption/l10n/ja_JP.php +++ b/apps/files_encryption/l10n/ja_JP.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "リカバリ用のキーは正常に有効化されました", +"Could not enable recovery key. Please check your recovery key password!" => "リカバリ用のキーを有効にできませんでした。リカバリ用のキーのパスワードを確認して下さい!", +"Recovery key successfully disabled" => "リカバリ用のキーを正常に無効化しました", +"Could not disable recovery key. Please check your recovery key password!" => "リカバリ用のキーを無効化できませんでした。リカバリ用のキーのパスワードを確認して下さい!", "Password successfully changed." => "パスワードを変更できました。", "Could not change the password. Maybe the old password was not correct." => "パスワードを変更できませんでした。古いパスワードが間違っているかもしれません。", "Saving..." => "保存中...", diff --git a/apps/files_encryption/l10n/nl.php b/apps/files_encryption/l10n/nl.php index ebcbdfab15f..9c462917cf3 100644 --- a/apps/files_encryption/l10n/nl.php +++ b/apps/files_encryption/l10n/nl.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Herstelsleutel succesvol geactiveerd", +"Could not enable recovery key. Please check your recovery key password!" => "Kon herstelsleutel niet activeren. Controleer het wachtwoord van uw herstelsleutel!", +"Recovery key successfully disabled" => "Herstelsleutel succesvol gedeactiveerd", +"Could not disable recovery key. Please check your recovery key password!" => "Kon herstelsleutel niet deactiveren. Controleer het wachtwoord van uw herstelsleutel!", "Password successfully changed." => "Wachtwoord succesvol gewijzigd.", "Could not change the password. Maybe the old password was not correct." => "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", "Saving..." => "Opslaan", diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php index ce8814c233e..e5fa0b55cad 100644 --- a/apps/files_encryption/l10n/pt_BR.php +++ b/apps/files_encryption/l10n/pt_BR.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Recuperação de chave habilitada com sucesso", +"Could not enable recovery key. Please check your recovery key password!" => "Impossível habilitar recuperação de chave. Por favor verifique sua senha para recuperação de chave!", +"Recovery key successfully disabled" => "Recuperação de chave desabilitada com sucesso", +"Could not disable recovery key. Please check your recovery key password!" => "Impossível desabilitar recuperação de chave. Por favor verifique sua senha para recuperação de chave!", "Password successfully changed." => "Senha alterada com sucesso.", "Could not change the password. Maybe the old password was not correct." => "Não foi possível alterar a senha. Talvez a senha antiga não estava correta.", "Saving..." => "Salvando...", diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index f47d49cf222..52d5dbc48d9 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -14,7 +14,7 @@ var LdapConfiguration = { //deal with Checkboxes if($(elementID).is('input[type=checkbox]')) { - if(configvalue === 1) { + if(parseInt(configvalue) === 1) { $(elementID).attr('checked', 'checked'); } else { $(elementID).removeAttr('checked'); diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php index e22c5b5bdd9..8aa64477e41 100644 --- a/apps/user_ldap/l10n/de_DE.php +++ b/apps/user_ldap/l10n/de_DE.php @@ -74,6 +74,8 @@ "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Ohne Eingabe wird der Benutzername (Standard) verwendet. Anderenfalls tragen Sie bitte ein LDAP/AD-Attribut ein.", "Internal Username" => "Interner Benutzername", "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder in ownCloud. It is also a port of remote URLs, for instance for all *DAV services. With this setting, the default behaviour can be overriden. To achieve a similar behaviour as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behaviour. Changes will have effect only on newly mapped (added) LDAP users." => "Standardmäßig wird der interne Benutzername mittels des UUID-Attributes erzeugt. Dies stellt sicher, dass der Benutzername einzigartig ist und keinerlei Zeichen konvertiert werden müssen. Der interne Benutzername unterliegt Beschränkungen, die nur die nachfolgenden Zeichen erlauben: [ a-zA-Z0-9_.@- ]. Andere Zeichenwerden mittels ihrer korrespondierenden Zeichen ersetzt oder einfach ausgelassen. Bei Übereinstimmungen wird ein Zähler hinzugefügt bzw. der Zähler um einen Wert erhöht. Der interne Benutzername wird benutzt, um einen Benutzer intern zu identifizieren. Es ist ebenso der standardmäßig vorausgewählte Namen des Heimatverzeichnisses in ownCloud. Es dient weiterhin als Port für Remote-URLs - zum Beispiel für alle *DAV-Dienste Mit dieser Einstellung kann das Standardverhalten überschrieben werden. Um ein ähnliches Verhalten wie vor ownCloud 5 zu erzielen, fügen Sie das anzuzeigende Attribut des Benutzernamens in das nachfolgende Feld ein. Lassen Sie dies hingegen für das Standardverhalten leer. Die Änderungen werden sich einzig und allein nur auf neu gemappte (hinzugefügte) LDAP-Benutzer auswirken.", +"Override UUID detection" => "UUID-Erkennung überschreiben", +"UUID Attribute:" => "UUID-Attribut:", "Test Configuration" => "Testkonfiguration", "Help" => "Hilfe" ); diff --git a/apps/user_ldap/l10n/nl.php b/apps/user_ldap/l10n/nl.php index c935d387ccc..c75aae3ea4f 100644 --- a/apps/user_ldap/l10n/nl.php +++ b/apps/user_ldap/l10n/nl.php @@ -75,10 +75,13 @@ "User Home Folder Naming Rule" => "Gebruikers Home map naamgevingsregel", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Laat leeg voor de gebruikersnaam (standaard). Of, specificeer een LDAP/AD attribuut.", "Internal Username" => "Interne gebruikersnaam", +"By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder in ownCloud. It is also a port of remote URLs, for instance for all *DAV services. With this setting, the default behaviour can be overriden. To achieve a similar behaviour as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behaviour. Changes will have effect only on newly mapped (added) LDAP users." => "Standaard wordt de interne gebruikersnaam aangemaakt op basis van de UUID attribuut. Het zorgt ervoor dat de gebruikersnaam uniek is en dat tekens niet hoeven te worden geconverteerd. De interne gebruikersnaam heeft als beperking dat alleen deze tekens zijn toegestaan: [a-zA-Z0-9_.@- ]. Andere tekens worden vervangen door hun ASCII vertaling of gewoonweg weggelaten. Bij identieke namen wordt een nummer toegevoegd of verhoogd. De interne gebruikersnaam wordt gebruikt om een gebruiker binnen het systeem te herkennen. Het is ook de standaardnaam voor de standaardmap van de gebruiker in ownCloud. Het is ook een vertaling voor externe URL's, bijvoorbeeld voor alle * DAV diensten. Met deze instelling kan het standaardgedrag worden overschreven. Om een soortgelijk gedrag te bereiken als van voor ownCloud 5, voer het gebruikersweergavenaam attribuut in in het volgende veld. Laat het leeg voor standaard gedrag. Veranderingen worden alleen toegepast op nieuw in kaart gebracht (toegevoegde) LDAP-gebruikers.", "Internal Username Attribute:" => "Interne gebruikersnaam attribuut:", "Override UUID detection" => "Negeren UUID detectie", +"By default, ownCloud autodetects the UUID attribute. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behaviour. Changes will have effect only on newly mapped (added) LDAP users and groups." => "Standaard herkent ownCloud het UUID attribuut automatisch. Het UUID attribuut wordt gebruikt om LDAP-gebruikers en -groepen uniek te identificeren. Ook zal de interne gebruikersnaam worden aangemaakt op basis van het UUID, tenzij dit hierboven anders is aangegeven. U kunt de instelling overschrijven en zelf een waarde voor het attribuut opgeven. U moet ervoor zorgen dat het ingestelde attribuut kan worden opgehaald voor zowel gebruikers als groepen en dat het uniek is. Laat het leeg voor standaard gedrag. Veranderingen worden alleen doorgevoerd op nieuw in kaart gebrachte (toegevoegde) LDAP-gebruikers en-groepen.", "UUID Attribute:" => "UUID Attribuut:", "Username-LDAP User Mapping" => "Gebruikersnaam-LDAP gebruikers vertaling", +"ownCloud uses usernames to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have a internal username. This requires a mapping from ownCloud username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found by ownCloud. The internal ownCloud name is used all over in ownCloud. Clearing the Mappings will have leftovers everywhere. Clearing the Mappings is not configuration sensitive, it affects all LDAP configurations! Do never clear the mappings in a production environment. Only clear mappings in a testing or experimental stage." => "ownCloud maakt gebruik van gebruikersnamen om (meta) data op te slaan en toe te wijzen. Om gebruikers uniek te identificeren, zal elke LDAP-gebruiker ook een interne gebruikersnaam krijgen. Dit vereist een mapping van de ownCloud gebruikersnaam naar een LDAP-gebruiker. De gecreëerde gebruikersnaam is gekoppeld aan de UUID van de LDAP-gebruiker. Ook de 'DN' wordt gecached om het aantal LDAP transacties te verminderen, maar deze wordt niet gebruikt voor identificatie. Als de DN verandert, zullen de veranderingen worden gevonden door ownCloud. De interne ownCloud naam wordt overal in ownCloud gebruikt. Wissen van de koppeling zal overal overblijfsel laten staan. Het wissen van Mappings is niet configuratiegevoelig, maar het raakt wel alle LDAP instellingen! Zorg ervoor dat deze Mappings nooit in een productieomgeving plaatsvinden. Maak ze alleen leeg in een test-of ontwikkelomgeving.", "Clear Username-LDAP User Mapping" => "Leegmaken Gebruikersnaam-LDAP gebruikers vertaling", "Clear Groupname-LDAP Group Mapping" => "Leegmaken Groepsnaam-LDAP groep vertaling", "Test Configuration" => "Test configuratie", diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index ba4de135341..409f3758792 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -601,14 +601,13 @@ class Connection { $error = null; } - $error = null; //if LDAP server is not reachable, try the Backup (Replica!) Server - if((!$bindStatus && ($error === -1)) + if((!$bindStatus && ($error !== 0)) || $this->config['ldapOverrideMainServer'] || $this->getFromCache('overrideMainServer')) { $this->doConnect($this->config['ldapBackupHost'], $this->config['ldapBackupPort']); $bindStatus = $this->bind(); - if($bindStatus && $error === -1) { + if(!$bindStatus && $error === -1) { //when bind to backup server succeeded and failed to main server, //skip contacting him until next cache refresh $this->writeToCache('overrideMainServer', true); @@ -636,10 +635,17 @@ class Connection { * Binds to LDAP */ public function bind() { + static $getConnectionResourceAttempt = false; if(!$this->config['ldapConfigurationActive']) { return false; } + if($getConnectionResourceAttempt) { + $getConnectionResourceAttempt = false; + return false; + } + $getConnectionResourceAttempt = true; $cr = $this->getConnectionResource(); + $getConnectionResourceAttempt = false; if(!is_resource($cr)) { return false; } diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php index 07d13a806a6..10ed40ebd6a 100644 --- a/apps/user_ldap/lib/helper.php +++ b/apps/user_ldap/lib/helper.php @@ -118,7 +118,13 @@ class Helper { return false; } - $query = \OCP\DB::prepare('TRUNCATE '.$table); + if(strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false) { + $query = \OCP\DB::prepare('DELETE FROM '.$table); + } else { + $query = \OCP\DB::prepare('TRUNCATE '.$table); + } + + $res = $query->execute(); if(\OCP\DB::isError($res)) { |