diff options
35 files changed, 200 insertions, 72 deletions
diff --git a/.htaccess b/.htaccess index af7e961379c..962e969d59c 100644 --- a/.htaccess +++ b/.htaccess @@ -12,6 +12,7 @@ php_value upload_max_filesize 513M php_value post_max_size 513M php_value memory_limit 512M php_value mbstring.func_overload 0 +php_value always_populate_raw_post_data -1 <IfModule env_module> SetEnv htaccessWorking true </IfModule> diff --git a/.user.ini b/.user.ini index 9f3691e5fba..09f6a05ff6c 100644 --- a/.user.ini +++ b/.user.ini @@ -2,3 +2,4 @@ upload_max_filesize=513M post_max_size=513M memory_limit=512M mbstring.func_overload=0 +always_populate_raw_post_data=-1 diff --git a/apps/files_encryption/l10n/cs_CZ.js b/apps/files_encryption/l10n/cs_CZ.js index 0162cf5d770..39cebae1018 100644 --- a/apps/files_encryption/l10n/cs_CZ.js +++ b/apps/files_encryption/l10n/cs_CZ.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Ujistěte se prosím, že máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Aplikace pro šifrování byla prozatím vypnuta.", "Following users are not set up for encryption:" : "Následující uživatelé nemají nastavené šifrování:", "Go directly to your %spersonal settings%s." : "Přejít přímo do svého %sosobního nastavení%s.", + "Server-side Encryption" : "Šifrování na serveru", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikace pro šifrování je zapnuta, ale vaše klíče nejsou inicializované. Prosím odhlaste se a znovu přihlaste", "Enable recovery key (allow to recover users files in case of password loss):" : "Povolit klíč pro obnovu (umožňuje obnovu uživatelských souborů v případě ztráty hesla)", "Recovery key password" : "Heslo klíče pro obnovu", diff --git a/apps/files_encryption/l10n/cs_CZ.json b/apps/files_encryption/l10n/cs_CZ.json index 6f14e882202..3fe4b4f57f1 100644 --- a/apps/files_encryption/l10n/cs_CZ.json +++ b/apps/files_encryption/l10n/cs_CZ.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Ujistěte se prosím, že máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Aplikace pro šifrování byla prozatím vypnuta.", "Following users are not set up for encryption:" : "Následující uživatelé nemají nastavené šifrování:", "Go directly to your %spersonal settings%s." : "Přejít přímo do svého %sosobního nastavení%s.", + "Server-side Encryption" : "Šifrování na serveru", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikace pro šifrování je zapnuta, ale vaše klíče nejsou inicializované. Prosím odhlaste se a znovu přihlaste", "Enable recovery key (allow to recover users files in case of password loss):" : "Povolit klíč pro obnovu (umožňuje obnovu uživatelských souborů v případě ztráty hesla)", "Recovery key password" : "Heslo klíče pro obnovu", diff --git a/apps/files_encryption/l10n/de.js b/apps/files_encryption/l10n/de.js index fa9f0847a79..e589640bbfb 100644 --- a/apps/files_encryption/l10n/de.js +++ b/apps/files_encryption/l10n/de.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Go directly to your %spersonal settings%s." : "Direkt zu Deinen %spersonal settings%s wechseln.", + "Server-side Encryption" : "Serverseitige Verschlüsselung", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Die Verschlüsselung-App ist aktiviert, aber Deine Schlüssel sind nicht initialisiert. Bitte melde Dich nochmals ab und wieder an.", "Enable recovery key (allow to recover users files in case of password loss):" : "Wiederherstellungsschlüssel aktivieren (ermöglicht das Wiederherstellen von Dateien, falls das Passwort vergessen wurde):", "Recovery key password" : "Wiederherstellungsschlüssel-Passwort", diff --git a/apps/files_encryption/l10n/de.json b/apps/files_encryption/l10n/de.json index a6f75c0b72a..99646e4a76a 100644 --- a/apps/files_encryption/l10n/de.json +++ b/apps/files_encryption/l10n/de.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Go directly to your %spersonal settings%s." : "Direkt zu Deinen %spersonal settings%s wechseln.", + "Server-side Encryption" : "Serverseitige Verschlüsselung", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Die Verschlüsselung-App ist aktiviert, aber Deine Schlüssel sind nicht initialisiert. Bitte melde Dich nochmals ab und wieder an.", "Enable recovery key (allow to recover users files in case of password loss):" : "Wiederherstellungsschlüssel aktivieren (ermöglicht das Wiederherstellen von Dateien, falls das Passwort vergessen wurde):", "Recovery key password" : "Wiederherstellungsschlüssel-Passwort", diff --git a/apps/files_encryption/l10n/de_DE.js b/apps/files_encryption/l10n/de_DE.js index efcbc5ae0ad..6b4b80dd0c3 100644 --- a/apps/files_encryption/l10n/de_DE.js +++ b/apps/files_encryption/l10n/de_DE.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Go directly to your %spersonal settings%s." : "Wechseln Sie direkt zu Ihren %spersonal settings%s.", + "Server-side Encryption" : "Serverseitige Verschlüsselung", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Verschlüsselung-App ist aktiviert, aber Ihre Schlüssel sind nicht initialisiert. Bitte nochmals ab- und wieder anmelden.", "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht).", "Recovery key password" : "Wiederherstellungschlüsselpasswort", diff --git a/apps/files_encryption/l10n/de_DE.json b/apps/files_encryption/l10n/de_DE.json index 155b74d5431..4c2dbcb283d 100644 --- a/apps/files_encryption/l10n/de_DE.json +++ b/apps/files_encryption/l10n/de_DE.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Go directly to your %spersonal settings%s." : "Wechseln Sie direkt zu Ihren %spersonal settings%s.", + "Server-side Encryption" : "Serverseitige Verschlüsselung", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Verschlüsselung-App ist aktiviert, aber Ihre Schlüssel sind nicht initialisiert. Bitte nochmals ab- und wieder anmelden.", "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht).", "Recovery key password" : "Wiederherstellungschlüsselpasswort", diff --git a/apps/files_encryption/l10n/es.js b/apps/files_encryption/l10n/es.js index e0cb0bc7abe..0ca865538eb 100644 --- a/apps/files_encryption/l10n/es.js +++ b/apps/files_encryption/l10n/es.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que OpenSSL y la extensión de PHP estén habilitados y configurados correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:", "Go directly to your %spersonal settings%s." : "Ir directamente a %sOpciones%s.", + "Server-side Encryption" : "Cifrado en el servidor", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La app de crifrado está habilitada pero sus claves no han sido inicializadas, por favor, cierre la sesión y vuelva a iniciarla de nuevo.", "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuario en caso de pérdida de la contraseña);", "Recovery key password" : "Contraseña de clave de recuperación", diff --git a/apps/files_encryption/l10n/es.json b/apps/files_encryption/l10n/es.json index 3ef880aff31..29d109dcd89 100644 --- a/apps/files_encryption/l10n/es.json +++ b/apps/files_encryption/l10n/es.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que OpenSSL y la extensión de PHP estén habilitados y configurados correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:", "Go directly to your %spersonal settings%s." : "Ir directamente a %sOpciones%s.", + "Server-side Encryption" : "Cifrado en el servidor", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La app de crifrado está habilitada pero sus claves no han sido inicializadas, por favor, cierre la sesión y vuelva a iniciarla de nuevo.", "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuario en caso de pérdida de la contraseña);", "Recovery key password" : "Contraseña de clave de recuperación", diff --git a/apps/files_encryption/l10n/fi_FI.js b/apps/files_encryption/l10n/fi_FI.js index fddcf3a0e30..d72e2da452f 100644 --- a/apps/files_encryption/l10n/fi_FI.js +++ b/apps/files_encryption/l10n/fi_FI.js @@ -2,18 +2,32 @@ OC.L10N.register( "files_encryption", { "Unknown error" : "Tuntematon virhe", + "Missing recovery key password" : "Palautusavaimen salasana puuttuu", + "Please repeat the recovery key password" : "Toista palautusavaimen salasana", + "Repeated recovery key password does not match the provided recovery key password" : "Toistamiseen annettu palautusavaimen salasana ei täsmää annettua palautusavaimen salasanaa", "Recovery key successfully enabled" : "Palautusavain kytketty päälle onnistuneesti", + "Could not disable recovery key. Please check your recovery key password!" : "Palautusavaimen poistaminen käytöstä ei onnistunut. Tarkista palautusavaimesi salasana!", + "Recovery key successfully disabled" : "Palautusavain poistettu onnistuneesti käytöstä", + "Please provide the old recovery password" : "Anna vanha palautussalasana", + "Please provide a new recovery password" : "Anna uusi palautussalasana", + "Please repeat the new recovery password" : "Toista uusi palautussalasana", "Password successfully changed." : "Salasana vaihdettiin onnistuneesti.", "Could not change the password. Maybe the old password was not correct." : "Salasanan vaihto epäonnistui. Kenties vanha salasana oli väärin.", + "Could not update the private key password." : "Yksityisen avaimen salasanaa ei voitu päivittää.", "The old password was not correct, please try again." : "Vanha salasana oli väärin, yritä uudelleen.", + "The current log-in password was not correct, please try again." : "Nykyinen kirjautumissalasana ei ollut oikein, yritä uudelleen.", "Private key password successfully updated." : "Yksityisen avaimen salasana päivitetty onnistuneesti.", "File recovery settings updated" : "Tiedostopalautuksen asetukset päivitetty", + "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Salaussovellusta ei ole käynnissä! Kenties salaussovellus otettiin uudelleen käyttöön nykyisen istuntosi aikana. Kirjaudu ulos ja takaisin sisään saadaksesi salaussovelluksen käyttöön.", + "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tämän tiedoston salauksen purkaminen ei onnistu. Kyseessä on luultavasti jaettu tiedosto. Pyydä tiedoston omistajaa jakamaan tiedosto kanssasi uudelleen.", "Unknown error. Please check your system settings or contact your administrator" : "Tuntematon virhe. Tarkista järjestelmän asetukset tai ole yhteydessä ylläpitäjään.", "Initial encryption started... This can take some time. Please wait." : "Ensimmäinen salauskerta käynnistetty... Tämä saattaa kestää hetken.", "Initial encryption running... Please try again later." : "Ensimmäinen salauskerta on meneillään... Yritä myöhemmin uudelleen.", "Missing requirements." : "Puuttuvat vaatimukset.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Varmista, että OpenSSL ja PHP-laajennus ovat käytössä ja niiden asetukset ovat oikein. Salaussovellus on poistettu toistaiseksi käytöstä.", "Following users are not set up for encryption:" : "Seuraavat käyttäjät eivät ole määrittäneet salausta:", "Go directly to your %spersonal settings%s." : "Siirry suoraan %shenkilökohtaisiin asetuksiisi%s.", + "Server-side Encryption" : "Palvelinpuolen salaus", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Salaussovellus on käytössä, mutta salausavaimia ei ole alustettu. Ole hyvä ja kirjaudu sisään uudelleen.", "Enable recovery key (allow to recover users files in case of password loss):" : "Käytä palautusavainta (salli käyttäjien tiedostojen palauttaminen, jos heidän salasana unohtuu):", "Recovery key password" : "Palautusavaimen salasana", @@ -25,10 +39,13 @@ OC.L10N.register( "New Recovery key password" : "Uusi palautusavaimen salasana", "Repeat New Recovery key password" : "Toista uusi palautusavaimen salasana", "Change Password" : "Vaihda salasana", + "Your private key password no longer matches your log-in password." : "Salaisen avaimesi salasana ei enää vastaa kirjautumissalasanaasi.", + "Set your old private key password to your current log-in password:" : "Aseta yksityisen avaimen vanha salasana vastaamaan nykyistä kirjautumissalasanaasi:", " If you don't remember your old password you can ask your administrator to recover your files." : "Jos et muista vanhaa salasanaasi, voit pyytää ylläpitäjää palauttamaan tiedostosi.", "Old log-in password" : "Vanha kirjautumissalasana", "Current log-in password" : "Nykyinen kirjautumissalasana", "Update Private Key Password" : "Päivitä yksityisen avaimen salasana", - "Enable password recovery:" : "Ota salasanan palautus käyttöön:" + "Enable password recovery:" : "Ota salasanan palautus käyttöön:", + "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Tämän valinnan käyttäminen mahdollistaa pääsyn salattuihin tiedostoihisi, jos salasana unohtuu" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_encryption/l10n/fi_FI.json b/apps/files_encryption/l10n/fi_FI.json index a9d6c86a542..2b0d92dfd55 100644 --- a/apps/files_encryption/l10n/fi_FI.json +++ b/apps/files_encryption/l10n/fi_FI.json @@ -1,17 +1,31 @@ { "translations": { "Unknown error" : "Tuntematon virhe", + "Missing recovery key password" : "Palautusavaimen salasana puuttuu", + "Please repeat the recovery key password" : "Toista palautusavaimen salasana", + "Repeated recovery key password does not match the provided recovery key password" : "Toistamiseen annettu palautusavaimen salasana ei täsmää annettua palautusavaimen salasanaa", "Recovery key successfully enabled" : "Palautusavain kytketty päälle onnistuneesti", + "Could not disable recovery key. Please check your recovery key password!" : "Palautusavaimen poistaminen käytöstä ei onnistunut. Tarkista palautusavaimesi salasana!", + "Recovery key successfully disabled" : "Palautusavain poistettu onnistuneesti käytöstä", + "Please provide the old recovery password" : "Anna vanha palautussalasana", + "Please provide a new recovery password" : "Anna uusi palautussalasana", + "Please repeat the new recovery password" : "Toista uusi palautussalasana", "Password successfully changed." : "Salasana vaihdettiin onnistuneesti.", "Could not change the password. Maybe the old password was not correct." : "Salasanan vaihto epäonnistui. Kenties vanha salasana oli väärin.", + "Could not update the private key password." : "Yksityisen avaimen salasanaa ei voitu päivittää.", "The old password was not correct, please try again." : "Vanha salasana oli väärin, yritä uudelleen.", + "The current log-in password was not correct, please try again." : "Nykyinen kirjautumissalasana ei ollut oikein, yritä uudelleen.", "Private key password successfully updated." : "Yksityisen avaimen salasana päivitetty onnistuneesti.", "File recovery settings updated" : "Tiedostopalautuksen asetukset päivitetty", + "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Salaussovellusta ei ole käynnissä! Kenties salaussovellus otettiin uudelleen käyttöön nykyisen istuntosi aikana. Kirjaudu ulos ja takaisin sisään saadaksesi salaussovelluksen käyttöön.", + "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tämän tiedoston salauksen purkaminen ei onnistu. Kyseessä on luultavasti jaettu tiedosto. Pyydä tiedoston omistajaa jakamaan tiedosto kanssasi uudelleen.", "Unknown error. Please check your system settings or contact your administrator" : "Tuntematon virhe. Tarkista järjestelmän asetukset tai ole yhteydessä ylläpitäjään.", "Initial encryption started... This can take some time. Please wait." : "Ensimmäinen salauskerta käynnistetty... Tämä saattaa kestää hetken.", "Initial encryption running... Please try again later." : "Ensimmäinen salauskerta on meneillään... Yritä myöhemmin uudelleen.", "Missing requirements." : "Puuttuvat vaatimukset.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Varmista, että OpenSSL ja PHP-laajennus ovat käytössä ja niiden asetukset ovat oikein. Salaussovellus on poistettu toistaiseksi käytöstä.", "Following users are not set up for encryption:" : "Seuraavat käyttäjät eivät ole määrittäneet salausta:", "Go directly to your %spersonal settings%s." : "Siirry suoraan %shenkilökohtaisiin asetuksiisi%s.", + "Server-side Encryption" : "Palvelinpuolen salaus", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Salaussovellus on käytössä, mutta salausavaimia ei ole alustettu. Ole hyvä ja kirjaudu sisään uudelleen.", "Enable recovery key (allow to recover users files in case of password loss):" : "Käytä palautusavainta (salli käyttäjien tiedostojen palauttaminen, jos heidän salasana unohtuu):", "Recovery key password" : "Palautusavaimen salasana", @@ -23,10 +37,13 @@ "New Recovery key password" : "Uusi palautusavaimen salasana", "Repeat New Recovery key password" : "Toista uusi palautusavaimen salasana", "Change Password" : "Vaihda salasana", + "Your private key password no longer matches your log-in password." : "Salaisen avaimesi salasana ei enää vastaa kirjautumissalasanaasi.", + "Set your old private key password to your current log-in password:" : "Aseta yksityisen avaimen vanha salasana vastaamaan nykyistä kirjautumissalasanaasi:", " If you don't remember your old password you can ask your administrator to recover your files." : "Jos et muista vanhaa salasanaasi, voit pyytää ylläpitäjää palauttamaan tiedostosi.", "Old log-in password" : "Vanha kirjautumissalasana", "Current log-in password" : "Nykyinen kirjautumissalasana", "Update Private Key Password" : "Päivitä yksityisen avaimen salasana", - "Enable password recovery:" : "Ota salasanan palautus käyttöön:" + "Enable password recovery:" : "Ota salasanan palautus käyttöön:", + "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Tämän valinnan käyttäminen mahdollistaa pääsyn salattuihin tiedostoihisi, jos salasana unohtuu" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_encryption/l10n/gl.js b/apps/files_encryption/l10n/gl.js index 197f66d6e68..6e9983159fd 100644 --- a/apps/files_encryption/l10n/gl.js +++ b/apps/files_encryption/l10n/gl.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que está instalado o OpenSSL xunto coa extensión PHP e que estean activados e configurados correctamente. Polo de agora foi desactivado a aplicación de cifrado.", "Following users are not set up for encryption:" : "Os seguintes usuarios non teñen configuración para o cifrado:", "Go directly to your %spersonal settings%s." : "Vaia directamente aos seus %saxustes persoais%s.", + "Server-side Encryption" : "Cifrado na parte do servidor", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "A aplicación de cifrado está activada, mais as chaves non foron inicializadas, saia da sesión e volva a acceder de novo", "Enable recovery key (allow to recover users files in case of password loss):" : "Activar a chave de recuperación (permitirá recuperar os ficheiros dos usuarios no caso de perda do contrasinal):", "Recovery key password" : "Contrasinal da chave de recuperación", diff --git a/apps/files_encryption/l10n/gl.json b/apps/files_encryption/l10n/gl.json index fd93b1dac41..6295f339253 100644 --- a/apps/files_encryption/l10n/gl.json +++ b/apps/files_encryption/l10n/gl.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que está instalado o OpenSSL xunto coa extensión PHP e que estean activados e configurados correctamente. Polo de agora foi desactivado a aplicación de cifrado.", "Following users are not set up for encryption:" : "Os seguintes usuarios non teñen configuración para o cifrado:", "Go directly to your %spersonal settings%s." : "Vaia directamente aos seus %saxustes persoais%s.", + "Server-side Encryption" : "Cifrado na parte do servidor", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "A aplicación de cifrado está activada, mais as chaves non foron inicializadas, saia da sesión e volva a acceder de novo", "Enable recovery key (allow to recover users files in case of password loss):" : "Activar a chave de recuperación (permitirá recuperar os ficheiros dos usuarios no caso de perda do contrasinal):", "Recovery key password" : "Contrasinal da chave de recuperación", diff --git a/apps/files_encryption/l10n/it.js b/apps/files_encryption/l10n/it.js index c0fed02ea8a..32fe42ae275 100644 --- a/apps/files_encryption/l10n/it.js +++ b/apps/files_encryption/l10n/it.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che OpenSSL e l'estensione PHP sia abilitatati e configurati correttamente. Per ora, l'applicazione di cifratura è disabilitata.", "Following users are not set up for encryption:" : "I seguenti utenti non sono configurati per la cifratura:", "Go directly to your %spersonal settings%s." : "Vai direttamente alle tue %simpostazioni personali%s.", + "Server-side Encryption" : "Cifratura lato server", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'applicazione di cifratura è abilitata, ma le chiavi non sono state inizializzate, disconnettiti ed effettua nuovamente l'accesso", "Enable recovery key (allow to recover users files in case of password loss):" : "Abilita la chiave di recupero (permette di recuperare i file utenti in caso di perdita della password):", "Recovery key password" : "Password della chiave di recupero", diff --git a/apps/files_encryption/l10n/it.json b/apps/files_encryption/l10n/it.json index 995e817dcff..e5fa00dca35 100644 --- a/apps/files_encryption/l10n/it.json +++ b/apps/files_encryption/l10n/it.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che OpenSSL e l'estensione PHP sia abilitatati e configurati correttamente. Per ora, l'applicazione di cifratura è disabilitata.", "Following users are not set up for encryption:" : "I seguenti utenti non sono configurati per la cifratura:", "Go directly to your %spersonal settings%s." : "Vai direttamente alle tue %simpostazioni personali%s.", + "Server-side Encryption" : "Cifratura lato server", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'applicazione di cifratura è abilitata, ma le chiavi non sono state inizializzate, disconnettiti ed effettua nuovamente l'accesso", "Enable recovery key (allow to recover users files in case of password loss):" : "Abilita la chiave di recupero (permette di recuperare i file utenti in caso di perdita della password):", "Recovery key password" : "Password della chiave di recupero", diff --git a/apps/files_encryption/l10n/pt_BR.js b/apps/files_encryption/l10n/pt_BR.js index 0b999de1f61..4dd588929e3 100644 --- a/apps/files_encryption/l10n/pt_BR.js +++ b/apps/files_encryption/l10n/pt_BR.js @@ -29,6 +29,7 @@ OC.L10N.register( "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL em conjunto com a extensão PHP está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.", "Following users are not set up for encryption:" : "Seguintes usuários não estão configurados para criptografia:", "Go directly to your %spersonal settings%s." : "Ir direto para suas %spersonal settings%s.", + "Server-side Encryption" : "Criptografia do lado do servidor", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "App de criptografia está ativado, mas as chaves não estão inicializadas, por favor log-out e faça login novamente", "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar chave de recuperação (permite recuperar arquivos de usuários em caso de perda de senha):", "Recovery key password" : "Senha da chave de recuperação", diff --git a/apps/files_encryption/l10n/pt_BR.json b/apps/files_encryption/l10n/pt_BR.json index d050961e774..59484331a50 100644 --- a/apps/files_encryption/l10n/pt_BR.json +++ b/apps/files_encryption/l10n/pt_BR.json @@ -27,6 +27,7 @@ "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL em conjunto com a extensão PHP está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.", "Following users are not set up for encryption:" : "Seguintes usuários não estão configurados para criptografia:", "Go directly to your %spersonal settings%s." : "Ir direto para suas %spersonal settings%s.", + "Server-side Encryption" : "Criptografia do lado do servidor", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "App de criptografia está ativado, mas as chaves não estão inicializadas, por favor log-out e faça login novamente", "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar chave de recuperação (permite recuperar arquivos de usuários em caso de perda de senha):", "Recovery key password" : "Senha da chave de recuperação", diff --git a/config/config.sample.php b/config/config.sample.php index ae22f3b1355..2513a2658ad 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -621,6 +621,18 @@ $CONFIG = array( * original size. A value of ``1`` or ``null`` disables scaling. */ 'preview_max_scale_factor' => 10, + +/** + * max file size for generating image previews with imagegd (default behaviour) + * If the image is bigger, it'll try other preview generators, + * but will most likely show the default mimetype icon + * + * Value represents the maximum filesize in megabytes + * Default is 50 + * Set to -1 for no limit + */ +'preview_max_filesize_image' => 50, + /** * custom path for LibreOffice/OpenOffice binary */ diff --git a/core/l10n/de.js b/core/l10n/de.js index f587197cae4..473372afd61 100644 --- a/core/l10n/de.js +++ b/core/l10n/de.js @@ -50,7 +50,7 @@ OC.L10N.register( "_{count} file conflict_::_{count} file conflicts_" : ["{count} Dateikonflikt","{count} Dateikonflikte"], "One file conflict" : "Ein Dateikonflikt", "New Files" : "Neue Dateien", - "Already existing files" : "Die Dateien existieren bereits", + "Already existing files" : "Bereits existierende Dateien", "Which files do you want to keep?" : "Welche Dateien möchtest Du behalten?", "If you select both versions, the copied file will have a number added to its name." : "Wenn Du beide Versionen auswählst, erhält die kopierte Datei eine Zahl am Ende des Dateinamens.", "Cancel" : "Abbrechen", diff --git a/core/l10n/de.json b/core/l10n/de.json index 61d6614fd19..021bc4c313f 100644 --- a/core/l10n/de.json +++ b/core/l10n/de.json @@ -48,7 +48,7 @@ "_{count} file conflict_::_{count} file conflicts_" : ["{count} Dateikonflikt","{count} Dateikonflikte"], "One file conflict" : "Ein Dateikonflikt", "New Files" : "Neue Dateien", - "Already existing files" : "Die Dateien existieren bereits", + "Already existing files" : "Bereits existierende Dateien", "Which files do you want to keep?" : "Welche Dateien möchtest Du behalten?", "If you select both versions, the copied file will have a number added to its name." : "Wenn Du beide Versionen auswählst, erhält die kopierte Datei eine Zahl am Ende des Dateinamens.", "Cancel" : "Abbrechen", diff --git a/core/l10n/de_DE.js b/core/l10n/de_DE.js index 9392c7bcf30..01308275f56 100644 --- a/core/l10n/de_DE.js +++ b/core/l10n/de_DE.js @@ -50,7 +50,7 @@ OC.L10N.register( "_{count} file conflict_::_{count} file conflicts_" : ["{count} Dateikonflikt","{count} Dateikonflikte"], "One file conflict" : "Ein Dateikonflikt", "New Files" : "Neue Dateien", - "Already existing files" : "Die Dateien existieren bereits", + "Already existing files" : "Bereits existierende Dateien", "Which files do you want to keep?" : "Welche Dateien möchten Sie behalten?", "If you select both versions, the copied file will have a number added to its name." : "Wenn Sie beide Versionen auswählen, erhält die kopierte Datei eine Zahl am Ende des Dateinamens.", "Cancel" : "Abbrechen", diff --git a/core/l10n/de_DE.json b/core/l10n/de_DE.json index 15927f13cb0..17548ecd471 100644 --- a/core/l10n/de_DE.json +++ b/core/l10n/de_DE.json @@ -48,7 +48,7 @@ "_{count} file conflict_::_{count} file conflicts_" : ["{count} Dateikonflikt","{count} Dateikonflikte"], "One file conflict" : "Ein Dateikonflikt", "New Files" : "Neue Dateien", - "Already existing files" : "Die Dateien existieren bereits", + "Already existing files" : "Bereits existierende Dateien", "Which files do you want to keep?" : "Welche Dateien möchten Sie behalten?", "If you select both versions, the copied file will have a number added to its name." : "Wenn Sie beide Versionen auswählen, erhält die kopierte Datei eine Zahl am Ende des Dateinamens.", "Cancel" : "Abbrechen", diff --git a/core/l10n/sl.js b/core/l10n/sl.js index aed6632424b..15960869d6f 100644 --- a/core/l10n/sl.js +++ b/core/l10n/sl.js @@ -133,6 +133,8 @@ OC.L10N.register( "New password" : "Novo geslo", "New Password" : "Novo geslo", "Reset password" : "Ponastavi geslo", + "Searching other places" : "Iskanje drugih mest", + "No search result in other places" : "Ni zadetkov iskanja drugih mest", "_{count} search result in other places_::_{count} search results in other places_" : ["","","",""], "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Sistem Mac OS X ni podprt, zato %s ne bo deloval zanesljivo v tem okolju. Program uporabljate na lastno odgovornost! ", "For the best results, please consider using a GNU/Linux server instead." : "Za najbolj še rezultate je priporočljivo uporabljati strežnik GNU/Linux.", diff --git a/core/l10n/sl.json b/core/l10n/sl.json index 65007f3f621..d530bde877c 100644 --- a/core/l10n/sl.json +++ b/core/l10n/sl.json @@ -131,6 +131,8 @@ "New password" : "Novo geslo", "New Password" : "Novo geslo", "Reset password" : "Ponastavi geslo", + "Searching other places" : "Iskanje drugih mest", + "No search result in other places" : "Ni zadetkov iskanja drugih mest", "_{count} search result in other places_::_{count} search results in other places_" : ["","","",""], "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Sistem Mac OS X ni podprt, zato %s ne bo deloval zanesljivo v tem okolju. Program uporabljate na lastno odgovornost! ", "For the best results, please consider using a GNU/Linux server instead." : "Za najbolj še rezultate je priporočljivo uporabljati strežnik GNU/Linux.", diff --git a/core/templates/login.php b/core/templates/login.php index 2198f063dbc..f10a8102180 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -19,6 +19,11 @@ script('core', [ <small><?php p($l->t('Please contact your administrator.')); ?></small> </div> <?php endif; ?> + <?php foreach($_['messages'] as $message): ?> + <div class="warning"> + <?php p($message); ?><br> + </div> + <?php endforeach; ?> <p id="message" class="hidden"> <img class="float-spinner" alt="" src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>" /> diff --git a/lib/base.php b/lib/base.php index dbfe0eb2f27..558be6b570f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -846,19 +846,24 @@ class OC { protected static function handleLogin() { OC_App::loadApps(array('prelogin')); $error = array(); + $messages = []; - // auth possible via apache module? - if (OC::tryApacheAuth()) { - $error[] = 'apacheauthfailed'; - } // remember was checked after last login - elseif (OC::tryRememberLogin()) { - $error[] = 'invalidcookie'; - } // logon via web form - elseif (OC::tryFormLogin()) { - $error[] = 'invalidpassword'; + try { + // auth possible via apache module? + if (OC::tryApacheAuth()) { + $error[] = 'apacheauthfailed'; + } // remember was checked after last login + elseif (OC::tryRememberLogin()) { + $error[] = 'invalidcookie'; + } // logon via web form + elseif (OC::tryFormLogin()) { + $error[] = 'invalidpassword'; + } + } catch (\OC\User\LoginException $e) { + $messages[] = $e->getMessage(); } - OC_Util::displayLoginPage(array_unique($error)); + OC_Util::displayLoginPage(array_unique($error), $messages); } /** diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index dc80d88a880..5858d992d56 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -24,6 +24,7 @@ namespace OC\AppFramework\DependencyInjection; +use OC; use OC\AppFramework\Http; use OC\AppFramework\Http\Request; use OC\AppFramework\Http\Dispatcher; @@ -61,79 +62,79 @@ class DIContainer extends SimpleContainer implements IAppContainer { * Core services */ $this->registerService('OCP\\IAppConfig', function($c) { - return \OC::$server->getAppConfig(); + return $this->getServer()->getAppConfig(); }); $this->registerService('OCP\\IAppManager', function($c) { - return \OC::$server->getAppManager(); + return $this->getServer()->getAppManager(); }); $this->registerService('OCP\\IAvatarManager', function($c) { - return \OC::$server->getAvatarManager(); + return $this->getServer()->getAvatarManager(); }); $this->registerService('OCP\\Activity\\IManager', function($c) { - return \OC::$server->getActivityManager(); + return $this->getServer()->getActivityManager(); }); $this->registerService('OCP\\ICache', function($c) { - return \OC::$server->getCache(); + return $this->getServer()->getCache(); }); $this->registerService('OCP\\ICacheFactory', function($c) { - return \OC::$server->getMemCacheFactory(); + return $this->getServer()->getMemCacheFactory(); }); $this->registerService('OCP\\IConfig', function($c) { - return \OC::$server->getConfig(); + return $this->getServer()->getConfig(); }); $this->registerService('OCP\\Contacts\\IManager', function($c) { - return \OC::$server->getContactsManager(); + return $this->getServer()->getContactsManager(); }); $this->registerService('OCP\\IDateTimeZone', function($c) { - return \OC::$server->getDateTimeZone(); + return $this->getServer()->getDateTimeZone(); }); $this->registerService('OCP\\IDb', function($c) { - return \OC::$server->getDb(); + return $this->getServer()->getDb(); }); $this->registerService('OCP\\IDBConnection', function($c) { - return \OC::$server->getDatabaseConnection(); + return $this->getServer()->getDatabaseConnection(); }); $this->registerService('OCP\\Diagnostics\\IEventLogger', function($c) { - return \OC::$server->getEventLogger(); + return $this->getServer()->getEventLogger(); }); $this->registerService('OCP\\Diagnostics\\IQueryLogger', function($c) { - return \OC::$server->getQueryLogger(); + return $this->getServer()->getQueryLogger(); }); $this->registerService('OCP\\Files\\Config\\IMountProviderCollection', function($c) { - return \OC::$server->getMountProviderCollection(); + return $this->getServer()->getMountProviderCollection(); }); $this->registerService('OCP\\Files\\IRootFolder', function($c) { - return \OC::$server->getRootFolder(); + return $this->getServer()->getRootFolder(); }); $this->registerService('OCP\\IGroupManager', function($c) { - return \OC::$server->getGroupManager(); + return $this->getServer()->getGroupManager(); }); $this->registerService('OCP\\IL10N', function($c) { - return \OC::$server->getL10N($c->query('AppName')); + return $this->getServer()->getL10N($c->query('AppName')); }); $this->registerService('OCP\\ILogger', function($c) { - return \OC::$server->getLogger(); + return $this->getServer()->getLogger(); }); $this->registerService('OCP\\BackgroundJob\\IJobList', function($c) { - return \OC::$server->getJobList(); + return $this->getServer()->getJobList(); }); $this->registerService('OCP\\AppFramework\\Utility\\IControllerMethodReflector', function($c) { @@ -141,11 +142,11 @@ class DIContainer extends SimpleContainer implements IAppContainer { }); $this->registerService('OCP\\INavigationManager', function($c) { - return \OC::$server->getNavigationManager(); + return $this->getServer()->getNavigationManager(); }); $this->registerService('OCP\\IPreview', function($c) { - return \OC::$server->getPreviewManager(); + return $this->getServer()->getPreviewManager(); }); $this->registerService('OCP\\IRequest', function($c) { @@ -153,11 +154,11 @@ class DIContainer extends SimpleContainer implements IAppContainer { }); $this->registerService('OCP\\ITagManager', function($c) { - return \OC::$server->getTagManager(); + return $this->getServer()->getTagManager(); }); $this->registerService('OCP\\ITempManager', function($c) { - return \OC::$server->getTempManager(); + return $this->getServer()->getTempManager(); }); $this->registerService('OCP\\AppFramework\\Utility\\ITimeFactory', function($c) { @@ -165,47 +166,43 @@ class DIContainer extends SimpleContainer implements IAppContainer { }); $this->registerService('OCP\\Route\\IRouter', function($c) { - return \OC::$server->getRouter(); + return $this->getServer()->getRouter(); }); $this->registerService('OCP\\ISearch', function($c) { - return \OC::$server->getSearch(); + return $this->getServer()->getSearch(); }); $this->registerService('OCP\\ISearch', function($c) { - return \OC::$server->getSearch(); + return $this->getServer()->getSearch(); }); $this->registerService('OCP\\Security\\ICrypto', function($c) { - return \OC::$server->getCrypto(); + return $this->getServer()->getCrypto(); }); $this->registerService('OCP\\Security\\IHasher', function($c) { - return \OC::$server->getHasher(); + return $this->getServer()->getHasher(); }); $this->registerService('OCP\\Security\\ISecureRandom', function($c) { - return \OC::$server->getSecureRandom(); + return $this->getServer()->getSecureRandom(); }); $this->registerService('OCP\\IURLGenerator', function($c) { - return \OC::$server->getURLGenerator(); + return $this->getServer()->getURLGenerator(); }); $this->registerService('OCP\\IUserManager', function($c) { - return \OC::$server->getUserManager(); + return $this->getServer()->getUserManager(); }); $this->registerService('OCP\\IUserSession', function($c) { - return \OC::$server->getUserSession(); + return $this->getServer()->getUserSession(); }); $this->registerService('ServerContainer', function ($c) { - $c->query('OCP\\ILogger')->debug( - 'Accessing the server container is deprecated. Use type ' . - 'annotations to inject core services instead!' - ); - return \OC::$server; + return $this->getServer(); }); // commonly used attributes @@ -330,7 +327,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { */ function getServer() { - return $this->query('ServerContainer'); + return OC::$server; } /** @@ -367,7 +364,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { } private function getUserId() { - return \OC::$server->getSession()->get('user_id'); + return $this->getServer()->getSession()->get('user_id'); } /** diff --git a/lib/private/image.php b/lib/private/image.php index 90b024de3d3..f5f9a04facc 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -467,7 +467,6 @@ class OC_Image { public function loadFromFile($imagePath = false) { // exif_imagetype throws "read error!" if file is less than 12 byte if (!@is_file($imagePath) || !file_exists($imagePath) || filesize($imagePath) < 12 || !is_readable($imagePath)) { - $this->logger->debug('OC_Image->loadFromFile, could not load: ' . (string)urlencode($imagePath), array('app' => 'core')); return false; } $iType = exif_imagetype($imagePath); diff --git a/lib/private/mail.php b/lib/private/mail.php index 8ba7343e011..6b7eec6e080 100644 --- a/lib/private/mail.php +++ b/lib/private/mail.php @@ -126,6 +126,9 @@ class OC_Mail { * @return bool */ public static function validateAddress($emailAddress) { + if (strpos($emailAddress, '@') === false) { + return false; + } $emailAddress = self::buildAsciiEmail($emailAddress); return PHPMailer::ValidateAddress($emailAddress); } diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php index 986a44b48fd..e8473ebb8a4 100644 --- a/lib/private/preview/image.php +++ b/lib/private/preview/image.php @@ -26,6 +26,13 @@ class Image extends Provider { return false; } + $maxSizeForImages = \OC::$server->getConfig()->getSystemValue('preview_max_filesize_image', 50); + $size = $fileInfo->getSize(); + + if ($maxSizeForImages !== -1 && $size > ($maxSizeForImages * 1024 * 1024)) { + return false; + } + $image = new \OC_Image(); if($fileInfo['encrypted'] === true) { diff --git a/lib/private/user/loginexception.php b/lib/private/user/loginexception.php new file mode 100644 index 00000000000..571f66bd945 --- /dev/null +++ b/lib/private/user/loginexception.php @@ -0,0 +1,12 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\User; + +class LoginException extends \Exception { +} diff --git a/lib/private/user/session.php b/lib/private/user/session.php index 3cd83aae52f..ffb26776f97 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -189,6 +189,7 @@ class Session implements IUserSession, Emitter { * @param string $uid * @param string $password * @return boolean|null + * @throws LoginException */ public function login($uid, $password) { $this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); @@ -199,7 +200,11 @@ class Session implements IUserSession, Emitter { $this->setUser($user); $this->setLoginName($uid); $this->manager->emit('\OC\User', 'postLogin', array($user, $password)); - return true; + if ($this->isLoggedIn()) { + return true; + } else { + throw new LoginException('Login canceled by app'); + } } else { return false; } diff --git a/lib/private/util.php b/lib/private/util.php index 3b943f046bf..35b86da5d53 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -628,10 +628,25 @@ class OC_Util { ); $webServerRestart = true; } + + /** + * PHP 5.6 ships with a PHP setting which throws notices by default for a + * lot of endpoints. Thus we need to ensure that the value is set to -1 + * + * @link https://github.com/owncloud/core/issues/13592 + */ + if(version_compare(phpversion(), '5.6.0', '>=') && + \OC::$server->getIniWrapper()->getNumeric('always_populate_raw_post_data') !== -1) { + $errors[] = array( + 'error' => $l->t('PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code.'), + 'hint' => $l->t('To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini') + ); + } + if (!self::isAnnotationsWorking()) { $errors[] = array( - 'error' => 'PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.', - 'hint' => 'This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.' + 'error' => $l->t('PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.'), + 'hint' => $l->t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.') ); } @@ -782,12 +797,14 @@ class OC_Util { /** * @param array $errors + * @param string[] $messages */ - public static function displayLoginPage($errors = array()) { + public static function displayLoginPage($errors = array(), $messages = []) { $parameters = array(); foreach ($errors as $value) { $parameters[$value] = true; } + $parameters['messages'] = $messages; if (!empty($_REQUEST['user'])) { $parameters["username"] = $_REQUEST['user']; $parameters['user_autofocus'] = false; diff --git a/tests/lib/mail.php b/tests/lib/mail.php index 568ecff52b0..813dde1944f 100644 --- a/tests/lib/mail.php +++ b/tests/lib/mail.php @@ -8,28 +8,23 @@ class Test_Mail extends \Test\TestCase { - protected function setUp() - { - parent::setUp(); - - if (!function_exists('idn_to_ascii')) { - $this->markTestSkipped( - 'The intl extension is not available.' - ); - } - } - /** * @dataProvider buildAsciiEmailProvider * @param $expected * @param $address */ public function testBuildAsciiEmail($expected, $address) { + if (!function_exists('idn_to_ascii')) { + $this->markTestSkipped( + 'The intl extension is not available.' + ); + } + $actual = \OC_Mail::buildAsciiEmail($address); $this->assertEquals($expected, $actual); } - function buildAsciiEmailProvider() { + public function buildAsciiEmailProvider() { return array( array('info@example.com', 'info@example.com'), array('info@xn--cjr6vy5ejyai80u.com', 'info@國際化域名.com'), @@ -38,4 +33,21 @@ class Test_Mail extends \Test\TestCase { ); } + public function validateMailProvider() { + return array( + array('infoatexample.com', false), + array('info', false), + ); + } + + /** + * @dataProvider validateMailProvider + * @param $address + * @param $expected + */ + public function testValidateEmail($address, $expected) { + $actual = \OC_Mail::validateAddress($address); + $this->assertEquals($expected, $actual); + } + } |