summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/l10n/es.js2
-rw-r--r--apps/encryption/l10n/es.json2
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php12
-rw-r--r--apps/theming/l10n/pt_PT.js39
-rw-r--r--apps/theming/l10n/pt_PT.json37
-rw-r--r--apps/user_ldap/l10n/es.js2
-rw-r--r--apps/user_ldap/l10n/es.json2
-rw-r--r--apps/user_ldap/lib/Connection.php31
-rw-r--r--apps/user_ldap/tests/ConnectionTest.php2
9 files changed, 120 insertions, 9 deletions
diff --git a/apps/encryption/l10n/es.js b/apps/encryption/l10n/es.js
index 45897efbb47..d7d0f4af1e7 100644
--- a/apps/encryption/l10n/es.js
+++ b/apps/encryption/l10n/es.js
@@ -9,7 +9,7 @@ OC.L10N.register(
"Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
"Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor, ¡compruebe su contraseña!",
"Missing parameters" : "Faltan parámetros",
- "Please provide the old recovery password" : "Por favor, ingrese su antigua contraseña de recuperación",
+ "Please provide the old recovery password" : "Por favor, introduzca su antigua contraseña de recuperación",
"Please provide a new recovery password" : "Por favor, provea una nueva contraseña de recuperación",
"Please repeat the new recovery password" : "Por favor, repita su nueva contraseña de recuperación",
"Password successfully changed." : "Su contraseña ha sido cambiada",
diff --git a/apps/encryption/l10n/es.json b/apps/encryption/l10n/es.json
index 96716dc6284..17ba43a1bf0 100644
--- a/apps/encryption/l10n/es.json
+++ b/apps/encryption/l10n/es.json
@@ -7,7 +7,7 @@
"Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
"Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor, ¡compruebe su contraseña!",
"Missing parameters" : "Faltan parámetros",
- "Please provide the old recovery password" : "Por favor, ingrese su antigua contraseña de recuperación",
+ "Please provide the old recovery password" : "Por favor, introduzca su antigua contraseña de recuperación",
"Please provide a new recovery password" : "Por favor, provea una nueva contraseña de recuperación",
"Please repeat the new recovery password" : "Por favor, repita su nueva contraseña de recuperación",
"Password successfully changed." : "Su contraseña ha sido cambiada",
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index 99f1a0ddd57..402381ab58a 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -31,6 +31,7 @@
namespace OCA\Provisioning_API\Controller;
use OC\Accounts\AccountManager;
+use OC\HintException;
use OC\Settings\Mailer\NewUserMailHelper;
use OC_Helper;
use OCA\Provisioning_API\FederatedFileSharingFactory;
@@ -193,15 +194,22 @@ class UsersController extends OCSController {
try {
$newUser = $this->userManager->createUser($userid, $password);
- $this->logger->info('Successful addUser call with userid: '.$userid, ['app' => 'ocs_api']);
+ $this->logger->info('Successful addUser call with userid: ' . $userid, ['app' => 'ocs_api']);
if (is_array($groups)) {
foreach ($groups as $group) {
$this->groupManager->get($group)->addUser($newUser);
- $this->logger->info('Added userid '.$userid.' to group '.$group, ['app' => 'ocs_api']);
+ $this->logger->info('Added userid ' . $userid . ' to group ' . $group, ['app' => 'ocs_api']);
}
}
return new DataResponse();
+ } catch (HintException $e ) {
+ $this->logger->logException($e, [
+ 'message' => 'Failed addUser attempt with hint exception.',
+ 'level' => \OCP\Util::WARN,
+ 'app' => 'ocs_api',
+ ]);
+ throw new OCSException($e->getHint(), 107);
} catch (\Exception $e) {
$this->logger->logException($e, [
'message' => 'Failed addUser attempt with exception.',
diff --git a/apps/theming/l10n/pt_PT.js b/apps/theming/l10n/pt_PT.js
new file mode 100644
index 00000000000..8404ae98ca4
--- /dev/null
+++ b/apps/theming/l10n/pt_PT.js
@@ -0,0 +1,39 @@
+OC.L10N.register(
+ "theming",
+ {
+ "Loading preview…" : "A carregar pre-visualização...",
+ "Saved" : "Guardado",
+ "Admin" : "Administrador",
+ "a safe home for all your data" : "Um local seguro para todos os seus dados",
+ "The given name is too long" : "O nome atribuído é demasiado longo",
+ "The given web address is too long" : "O endereço web atribuído é demasiado longo",
+ "The given slogan is too long" : "O slogan atribuído é demasiado longo",
+ "The given color is invalid" : "A cor atribuída é inválida",
+ "There is no error, the file uploaded with success" : "Não ocorreu nenhum erro, o ficheiro foi carregado com sucesso",
+ "The uploaded file exceeds the upload_max_filesize directive in php.ini" : "O ficheiro carregado excede a directiva upload_max_filesize no php.ini ",
+ "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "O ficheiro carregado excedo a directiva MAX_FILE_SIZE especificada no formulário HTML",
+ "The uploaded file was only partially uploaded" : "O ficheiro escolhido foi apenas parcialmente carregado",
+ "No file was uploaded" : "O ficheiro foi carregado",
+ "Missing a temporary folder" : "Falta uma pasta temporária",
+ "Failed to write file to disk." : "Falhou a escrever o ficheiro no disco.",
+ "A PHP extension stopped the file upload." : "Uma extensão PHP parou o carregamento do ficheiro.",
+ "No file uploaded" : "Nenhum ficheiro carregado",
+ "Unsupported image type" : "Tipo de imagem não suportado",
+ "You are already using a custom theme" : "Já está a usar um tema personalizado",
+ "Theming" : "Temática",
+ "Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "A tematização possibilita a fácil personalização da aparência da sua instância e clientes suportados. Isto será visível para todos os utilizadores",
+ "Name" : "Nome",
+ "Reset to default" : "Repor original",
+ "Web address" : "Endereço Web",
+ "Web address https://…" : "Endereço Web https::// ...",
+ "Slogan" : "Slogan",
+ "Color" : "Cor",
+ "Logo" : "Logótipo",
+ "Upload new logo" : "Carregar novo logótipo",
+ "Login image" : "Imagem de Login",
+ "Upload new login background" : "Carregar imagem de segundo plano de Login",
+ "Remove background image" : "Remover imagem de segundo plano",
+ "Install the Imagemagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color." : "Instale a extensão PHP Imagemagick com suporte para imagens SVG para gerar automaticamente favicons com base na cor e no logotipo carregado.",
+ "reset to default" : "restaurar valor padrão"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/theming/l10n/pt_PT.json b/apps/theming/l10n/pt_PT.json
new file mode 100644
index 00000000000..f71dd3a1962
--- /dev/null
+++ b/apps/theming/l10n/pt_PT.json
@@ -0,0 +1,37 @@
+{ "translations": {
+ "Loading preview…" : "A carregar pre-visualização...",
+ "Saved" : "Guardado",
+ "Admin" : "Administrador",
+ "a safe home for all your data" : "Um local seguro para todos os seus dados",
+ "The given name is too long" : "O nome atribuído é demasiado longo",
+ "The given web address is too long" : "O endereço web atribuído é demasiado longo",
+ "The given slogan is too long" : "O slogan atribuído é demasiado longo",
+ "The given color is invalid" : "A cor atribuída é inválida",
+ "There is no error, the file uploaded with success" : "Não ocorreu nenhum erro, o ficheiro foi carregado com sucesso",
+ "The uploaded file exceeds the upload_max_filesize directive in php.ini" : "O ficheiro carregado excede a directiva upload_max_filesize no php.ini ",
+ "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "O ficheiro carregado excedo a directiva MAX_FILE_SIZE especificada no formulário HTML",
+ "The uploaded file was only partially uploaded" : "O ficheiro escolhido foi apenas parcialmente carregado",
+ "No file was uploaded" : "O ficheiro foi carregado",
+ "Missing a temporary folder" : "Falta uma pasta temporária",
+ "Failed to write file to disk." : "Falhou a escrever o ficheiro no disco.",
+ "A PHP extension stopped the file upload." : "Uma extensão PHP parou o carregamento do ficheiro.",
+ "No file uploaded" : "Nenhum ficheiro carregado",
+ "Unsupported image type" : "Tipo de imagem não suportado",
+ "You are already using a custom theme" : "Já está a usar um tema personalizado",
+ "Theming" : "Temática",
+ "Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "A tematização possibilita a fácil personalização da aparência da sua instância e clientes suportados. Isto será visível para todos os utilizadores",
+ "Name" : "Nome",
+ "Reset to default" : "Repor original",
+ "Web address" : "Endereço Web",
+ "Web address https://…" : "Endereço Web https::// ...",
+ "Slogan" : "Slogan",
+ "Color" : "Cor",
+ "Logo" : "Logótipo",
+ "Upload new logo" : "Carregar novo logótipo",
+ "Login image" : "Imagem de Login",
+ "Upload new login background" : "Carregar imagem de segundo plano de Login",
+ "Remove background image" : "Remover imagem de segundo plano",
+ "Install the Imagemagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color." : "Instale a extensão PHP Imagemagick com suporte para imagens SVG para gerar automaticamente favicons com base na cor e no logotipo carregado.",
+ "reset to default" : "restaurar valor padrão"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/user_ldap/l10n/es.js b/apps/user_ldap/l10n/es.js
index 6e53ea375f8..1f51667ca20 100644
--- a/apps/user_ldap/l10n/es.js
+++ b/apps/user_ldap/l10n/es.js
@@ -105,7 +105,7 @@ OC.L10N.register(
"Detect Base DN" : "Detectar Base DN",
"Test Base DN" : "Probar Base DN",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Evita peticiones automáticas al LDAP. Mejor para grandes configuraciones, pero requiere cierto conocimiento de LDAP.",
- "Manually enter LDAP filters (recommended for large directories)" : "Ingrese manualmente los filtros LDAP (Recomendado para grandes directorios)",
+ "Manually enter LDAP filters (recommended for large directories)" : "Introduzca manualmente los filtros LDAP (recomendado para directorios grandes)",
"Listing and searching for users is constrained by these criteria:" : "El listado y la búsqueda de usuarios es restringido por estos criterios:",
"The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Los objetos de clases más comunes para los usuarios son organizationalPerson, persona, usuario y inetOrgPerson. Si no está seguro de qué objeto de clase seleccionar, por favor, consulte con su administrador de directorio. ",
"The filter specifies which LDAP users shall have access to the %s instance." : "El filtro especifica que usuarios LDAP pueden tener acceso a %s.",
diff --git a/apps/user_ldap/l10n/es.json b/apps/user_ldap/l10n/es.json
index 8df4b896dc5..5d7352fd0c8 100644
--- a/apps/user_ldap/l10n/es.json
+++ b/apps/user_ldap/l10n/es.json
@@ -103,7 +103,7 @@
"Detect Base DN" : "Detectar Base DN",
"Test Base DN" : "Probar Base DN",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Evita peticiones automáticas al LDAP. Mejor para grandes configuraciones, pero requiere cierto conocimiento de LDAP.",
- "Manually enter LDAP filters (recommended for large directories)" : "Ingrese manualmente los filtros LDAP (Recomendado para grandes directorios)",
+ "Manually enter LDAP filters (recommended for large directories)" : "Introduzca manualmente los filtros LDAP (recomendado para directorios grandes)",
"Listing and searching for users is constrained by these criteria:" : "El listado y la búsqueda de usuarios es restringido por estos criterios:",
"The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Los objetos de clases más comunes para los usuarios son organizationalPerson, persona, usuario y inetOrgPerson. Si no está seguro de qué objeto de clase seleccionar, por favor, consulte con su administrador de directorio. ",
"The filter specifies which LDAP users shall have access to the %s instance." : "El filtro especifica que usuarios LDAP pueden tener acceso a %s.",
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php
index 1ea3cc67303..d2d8bc7395e 100644
--- a/apps/user_ldap/lib/Connection.php
+++ b/apps/user_ldap/lib/Connection.php
@@ -86,6 +86,8 @@ class Connection extends LDAPUtility {
protected $ignoreValidation = false;
+ protected $bindResult = [];
+
/**
* Constructor
* @param ILDAPWrapper $ldap
@@ -113,6 +115,7 @@ class Connection extends LDAPUtility {
public function __destruct() {
if(!$this->dontDestruct && $this->ldap->isResource($this->ldapConnectionRes)) {
@$this->ldap->unbind($this->ldapConnectionRes);
+ $this->bindResult = [];
}
}
@@ -202,6 +205,7 @@ class Connection extends LDAPUtility {
if(!is_null($this->ldapConnectionRes)) {
@$this->ldap->unbind($this->ldapConnectionRes);
$this->ldapConnectionRes = null;
+ $this->bindResult = [];
}
}
@@ -560,6 +564,7 @@ class Connection extends LDAPUtility {
if($isBackupHost && ($error !== 0 || $isOverrideMainServer)) {
$this->doConnect($this->configuration->ldapBackupHost,
$this->configuration->ldapBackupPort);
+ $this->bindResult = [];
$bindStatus = $this->bind();
$error = $this->ldap->isResource($this->ldapConnectionRes) ?
$this->ldap->errno($this->ldapConnectionRes) : -1;
@@ -612,13 +617,35 @@ class Connection extends LDAPUtility {
if(!$this->configuration->ldapConfigurationActive) {
return false;
}
- $cr = $this->getConnectionResource();
+ $cr = $this->ldapConnectionRes;
if(!$this->ldap->isResource($cr)) {
- return false;
+ $cr = $this->getConnectionResource();
+ }
+
+ if(
+ count($this->bindResult) !== 0
+ && $this->bindResult['dn'] === $this->configuration->ldapAgentName
+ && \OC::$server->getHasher()->verify(
+ $this->configPrefix . $this->configuration->ldapAgentPassword,
+ $this->bindResult['hash']
+ )
+ ) {
+ // don't attempt to bind again with the same data as before
+ // bind might have been invoked via getConnectionResource(),
+ // but we need results specifically for e.g. user login
+ return $this->bindResult['result'];
}
+
$ldapLogin = @$this->ldap->bind($cr,
$this->configuration->ldapAgentName,
$this->configuration->ldapAgentPassword);
+
+ $this->bindResult = [
+ 'dn' => $this->configuration->ldapAgentName,
+ 'hash' => \OC::$server->getHasher()->hash($this->configPrefix . $this->configuration->ldapAgentPassword),
+ 'result' => $ldapLogin,
+ ];
+
if(!$ldapLogin) {
$errno = $this->ldap->errno($cr);
diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php
index c0f91d25d39..cead84b05b0 100644
--- a/apps/user_ldap/tests/ConnectionTest.php
+++ b/apps/user_ldap/tests/ConnectionTest.php
@@ -174,7 +174,7 @@ class ConnectionTest extends \Test\TestCase {
->method('connect')
->will($this->returnValue('ldapResource'));
- $this->ldap->expects($this->exactly(2))
+ $this->ldap->expects($this->once())
->method('bind')
->will($this->returnValue(false));