summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/ajax/requesttoken.php40
-rw-r--r--core/js/eventsource.js2
-rw-r--r--core/js/requesttoken.js55
-rw-r--r--core/l10n/de.php4
-rw-r--r--core/l10n/de_DE.php4
-rw-r--r--core/l10n/fr.php5
-rw-r--r--core/l10n/pt_BR.php11
-rw-r--r--core/routes.php3
-rw-r--r--core/templates/installation.php6
-rw-r--r--core/templates/layout.base.php1
-rw-r--r--core/templates/layout.guest.php1
-rw-r--r--core/templates/layout.user.php8
12 files changed, 31 insertions, 109 deletions
diff --git a/core/ajax/requesttoken.php b/core/ajax/requesttoken.php
deleted file mode 100644
index 9d43a722852..00000000000
--- a/core/ajax/requesttoken.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
-* ownCloud
-* @author Christian Reiner
-* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the license, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library.
-* If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-/**
- * @file core/ajax/requesttoken.php
- * @brief Ajax method to retrieve a fresh request protection token for ajax calls
- * @return json: success/error state indicator including a fresh request token
- * @author Christian Reiner
- */
-
-// don't load apps or filesystem for this task
-$RUNTIME_NOAPPS = true;
-$RUNTIME_NOSETUPFS = true;
-
-// Sanity checks
-// using OCP\JSON::callCheck() below protects the token refreshing itself.
-//OCP\JSON::callCheck ( );
-OCP\JSON::checkLoggedIn ( );
-// hand out a fresh token
-OCP\JSON::success ( array ( 'token' => OCP\Util::callRegister() ) );
-?>
diff --git a/core/js/eventsource.js b/core/js/eventsource.js
index 45c63715a7e..e3ad7e3a671 100644
--- a/core/js/eventsource.js
+++ b/core/js/eventsource.js
@@ -40,7 +40,7 @@ OC.EventSource=function(src,data){
dataStr+=name+'='+encodeURIComponent(data[name])+'&';
}
}
- dataStr+='requesttoken='+OC.Request.Token;
+ dataStr+='requesttoken='+OC.EventSource.requesttoken;
if(!this.useFallBack && typeof EventSource !='undefined'){
this.source=new EventSource(src+'?'+dataStr);
this.source.onmessage=function(e){
diff --git a/core/js/requesttoken.js b/core/js/requesttoken.js
deleted file mode 100644
index 0d78cd7e93b..00000000000
--- a/core/js/requesttoken.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * ownCloud
- *
- * @file core/js/requesttoken.js
- * @brief Routine to refresh the Request protection request token periodically
- * @author Christian Reiner (arkascha)
- * @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the license, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library.
- * If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-OC.Request = {
- // the request token
- Token: {},
- // the lifespan span (in secs)
- Lifespan: {},
- // method to refresh the local request token periodically
- Refresh: function(){
- // just a client side console log to preserve efficiency
- console.log("refreshing request token (lifebeat)");
- var dfd=new $.Deferred();
- $.ajax({
- type: 'POST',
- url: OC.filePath('core','ajax','requesttoken.php'),
- cache: false,
- data: { },
- dataType: 'json'
- }).done(function(response){
- // store refreshed token inside this class
- OC.Request.Token=response.token;
- dfd.resolve();
- }).fail(dfd.reject);
- return dfd;
- }
-}
-// accept requesttoken and lifespan into the OC namespace
-OC.Request.Token = oc_requesttoken;
-OC.Request.Lifespan = oc_requestlifespan;
-// refresh the request token periodically shortly before it becomes invalid on the server side
-setInterval(OC.Request.Refresh,Math.floor(1000*OC.Request.Lifespan*0.93)), // 93% of lifespan value, close to when the token expires
-// early bind token as additional ajax argument for every single request
-$(document).bind('ajaxSend', function(elm, xhr, s){xhr.setRequestHeader('requesttoken', OC.Request.Token);});
diff --git a/core/l10n/de.php b/core/l10n/de.php
index 3c92f028581..2e761280519 100644
--- a/core/l10n/de.php
+++ b/core/l10n/de.php
@@ -37,7 +37,9 @@
"Error setting expiration date" => "Fehler beim Setzen des Ablaufdatums",
"ownCloud password reset" => "ownCloud-Passwort zurücksetzen",
"Use the following link to reset your password: {link}" => "Nutze den nachfolgenden Link, um Dein Passwort zurückzusetzen: {link}",
-"You will receive a link to reset your password via Email." => "Du erhälst einen Link per E-Mail, um Dein Passwort zurückzusetzen.",
+"You will receive a link to reset your password via Email." => "Du erhältst einen Link per E-Mail, um Dein Passwort zurückzusetzen.",
+"Reset email send." => "Die E-Mail zum Zurücksetzen wurde versendet.",
+"Request failed!" => "Die Anfrage schlug fehl!",
"Username" => "Benutzername",
"Request reset" => "Beantrage Zurücksetzung",
"Your password was reset" => "Dein Passwort wurde zurückgesetzt.",
diff --git a/core/l10n/de_DE.php b/core/l10n/de_DE.php
index 32ce4f0396e..1425970f3a4 100644
--- a/core/l10n/de_DE.php
+++ b/core/l10n/de_DE.php
@@ -38,8 +38,8 @@
"ownCloud password reset" => "ownCloud-Passwort zurücksetzen",
"Use the following link to reset your password: {link}" => "Nutzen Sie den nachfolgenden Link, um Ihr Passwort zurückzusetzen: {link}",
"You will receive a link to reset your password via Email." => "Sie erhalten einen Link per E-Mail, um Ihr Passwort zurückzusetzen.",
-"Reset email send." => "E-Mail zum Zurücksetzen des Passwort gesendet.",
-"Request failed!" => "Die Anforderung schlug fehl!",
+"Reset email send." => "E-Mail zum Zurücksetzen des Passworts gesendet.",
+"Request failed!" => "Die Anfrage schlug fehl!",
"Username" => "Benutzername",
"Request reset" => "Beantrage Zurücksetzung",
"Your password was reset" => "Ihr Passwort wurde zurückgesetzt.",
diff --git a/core/l10n/fr.php b/core/l10n/fr.php
index 597f58172d9..cdddea02b30 100644
--- a/core/l10n/fr.php
+++ b/core/l10n/fr.php
@@ -13,6 +13,8 @@
"Error while sharing" => "Erreur lors de la mise en partage",
"Error while unsharing" => "Erreur lors de l'annulation du partage",
"Error while changing permissions" => "Erreur lors du changement des permissions",
+"Shared with you and the group {group} by {owner}" => "Partagé par {owner} avec vous et le groupe {group}",
+"Shared with you by {owner}" => "Partagé avec vous par {owner}",
"Share with" => "Partager avec",
"Share with link" => "Partager via lien",
"Password protect" => "Protéger par un mot de passe",
@@ -22,6 +24,7 @@
"Share via email:" => "Partager via e-mail :",
"No people found" => "Aucun utilisateur trouvé",
"Resharing is not allowed" => "Le repartage n'est pas autorisé",
+"Shared in {item} with {user}" => "Partagé dans {item} avec {user}",
"Unshare" => "Ne plus partager",
"can edit" => "édition autorisée",
"access control" => "contrôle des accès",
@@ -35,6 +38,8 @@
"ownCloud password reset" => "Réinitialisation de votre mot de passe Owncloud",
"Use the following link to reset your password: {link}" => "Utilisez le lien suivant pour réinitialiser votre mot de passe : {link}",
"You will receive a link to reset your password via Email." => "Vous allez recevoir un e-mail contenant un lien pour réinitialiser votre mot de passe.",
+"Reset email send." => "Mail de réinitialisation envoyé.",
+"Request failed!" => "La requête a échoué !",
"Username" => "Nom d'utilisateur",
"Request reset" => "Demander la réinitialisation",
"Your password was reset" => "Votre mot de passe a été réinitialisé",
diff --git a/core/l10n/pt_BR.php b/core/l10n/pt_BR.php
index f40328407f9..f51c1a94c27 100644
--- a/core/l10n/pt_BR.php
+++ b/core/l10n/pt_BR.php
@@ -13,6 +13,8 @@
"Error while sharing" => "Erro ao compartilhar",
"Error while unsharing" => "Erro ao descompartilhar",
"Error while changing permissions" => "Erro ao mudar permissões",
+"Shared with you and the group {group} by {owner}" => "Compartilhado com você e com o grupo {group} por {owner}",
+"Shared with you by {owner}" => "Compartilhado com você por {owner}",
"Share with" => "Compartilhar com",
"Share with link" => "Compartilhar com link",
"Password protect" => "Proteger com senha",
@@ -22,6 +24,7 @@
"Share via email:" => "Compartilhar via e-mail:",
"No people found" => "Nenhuma pessoa encontrada",
"Resharing is not allowed" => "Não é permitido re-compartilhar",
+"Shared in {item} with {user}" => "Compartilhado em {item} com {user}",
"Unshare" => "Descompartilhar",
"can edit" => "pode editar",
"access control" => "controle de acesso",
@@ -35,6 +38,8 @@
"ownCloud password reset" => "Redefinir senha ownCloud",
"Use the following link to reset your password: {link}" => "Use o seguinte link para redefinir sua senha: {link}",
"You will receive a link to reset your password via Email." => "Você receberá um link para redefinir sua senha via e-mail.",
+"Reset email send." => "Email de redefinição de senha enviado.",
+"Request failed!" => "A requisição falhou!",
"Username" => "Nome de Usuário",
"Request reset" => "Pedido de reposição",
"Your password was reset" => "Sua senha foi mudada",
@@ -86,6 +91,8 @@
"December" => "Dezembro",
"web services under your control" => "web services sob seu controle",
"Log out" => "Sair",
+"Automatic logon rejected!" => "Entrada Automática no Sistema Rejeitada!",
+"If you did not change your password recently, your account may be compromised!" => "Se você não mudou a sua senha recentemente, a sua conta pode estar comprometida!",
"Please change your password to secure your account again." => "Por favor troque sua senha para tornar sua conta segura novamente.",
"Lost your password?" => "Esqueçeu sua senha?",
"remember" => "lembrete",
@@ -93,5 +100,7 @@
"You are logged out." => "Você está desconectado.",
"prev" => "anterior",
"next" => "próximo",
-"Security Warning!" => "Aviso de Segurança!"
+"Security Warning!" => "Aviso de Segurança!",
+"Please verify your password. <br/>For security reasons you may be occasionally asked to enter your password again." => "Por favor, verifique a sua senha.<br />Por motivos de segurança, você deverá ser solicitado a muda-la ocasionalmente.",
+"Verify" => "Verificar"
);
diff --git a/core/routes.php b/core/routes.php
index cc0aa53a21e..6f999356689 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -13,9 +13,6 @@ $this->create('search_ajax_search', '/search/ajax/search.php')
// AppConfig
$this->create('core_ajax_appconfig', '/core/ajax/appconfig.php')
->actionInclude('core/ajax/appconfig.php');
-// RequestToken
-$this->create('core_ajax_requesttoken', '/core/ajax/requesttoken.php')
- ->actionInclude('core/ajax/requesttoken.php');
// Share
$this->create('core_ajax_share', '/core/ajax/share.php')
->actionInclude('core/ajax/share.php');
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 5a3bd2cc9f0..a7c4780d5d1 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -73,7 +73,7 @@
<p>MySQL <?php echo $l->t( 'will be used' ); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="mysql" />
<?php else: ?>
- <input type="radio" name="dbtype" value="mysql" id="mysql" <?php OC_Helper::init_radio('dbtype','mysql', 'sqlite'); ?>/>
+ <input type="radio" name="dbtype" value="mysql" id="mysql" <?php OC_Helper::init_radio('dbtype', 'mysql', 'sqlite'); ?>/>
<label class="mysql" for="mysql">MySQL</label>
<?php endif; ?>
<?php endif; ?>
@@ -84,7 +84,7 @@
<input type="hidden" id="dbtype" name="dbtype" value="pgsql" />
<?php else: ?>
<label class="pgsql" for="pgsql">PostgreSQL</label>
- <input type="radio" name="dbtype" value='pgsql' id="pgsql" <?php OC_Helper::init_radio('dbtype','pgsql', 'sqlite'); ?>/>
+ <input type="radio" name="dbtype" value='pgsql' id="pgsql" <?php OC_Helper::init_radio('dbtype', 'pgsql', 'sqlite'); ?>/>
<?php endif; ?>
<?php endif; ?>
@@ -94,7 +94,7 @@
<input type="hidden" id="dbtype" name="dbtype" value="oci" />
<?php else: ?>
<label class="oci" for="oci">Oracle</label>
- <input type="radio" name="dbtype" value='oci' id="oci" <?php OC_Helper::init_radio('dbtype','oci', 'sqlite'); ?>/>
+ <input type="radio" name="dbtype" value='oci' id="oci" <?php OC_Helper::init_radio('dbtype', 'oci', 'sqlite'); ?>/>
<?php endif; ?>
<?php endif; ?>
</div>
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index f78b6ff8bbd..d8f83058775 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -11,7 +11,6 @@
var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
var oc_appswebroots = <?php echo $_['apps_paths'] ?>;
var oc_requesttoken = '<?php echo $_['requesttoken']; ?>';
- var oc_requestlifespan = '<?php echo $_['requestlifespan']; ?>';
</script>
<?php foreach ($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index e6468cdcfb4..2eaa517b324 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -11,7 +11,6 @@
var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
var oc_appswebroots = <?php echo $_['apps_paths'] ?>;
var oc_requesttoken = '<?php echo $_['requesttoken']; ?>';
- var oc_requestlifespan = '<?php echo $_['requestlifespan']; ?>';
var datepickerFormatDate = <?php echo json_encode($l->l('jsdate', 'jsdate')) ?>;
var dayNames = <?php echo json_encode(array((string)$l->t('Sunday'), (string)$l->t('Monday'), (string)$l->t('Tuesday'), (string)$l->t('Wednesday'), (string)$l->t('Thursday'), (string)$l->t('Friday'), (string)$l->t('Saturday'))) ?>;
var monthNames = <?php echo json_encode(array((string)$l->t('January'), (string)$l->t('February'), (string)$l->t('March'), (string)$l->t('April'), (string)$l->t('May'), (string)$l->t('June'), (string)$l->t('July'), (string)$l->t('August'), (string)$l->t('September'), (string)$l->t('October'), (string)$l->t('November'), (string)$l->t('December'))) ?>;
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index d876fbc98e8..451a4685e82 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -12,7 +12,6 @@
var oc_appswebroots = <?php echo $_['apps_paths'] ?>;
var oc_current_user = '<?php echo OC_User::getUser() ?>';
var oc_requesttoken = '<?php echo $_['requesttoken']; ?>';
- var oc_requestlifespan = '<?php echo $_['requestlifespan']; ?>';
var datepickerFormatDate = <?php echo json_encode($l->l('jsdate', 'jsdate')) ?>;
var dayNames = <?php echo json_encode(array((string)$l->t('Sunday'), (string)$l->t('Monday'), (string)$l->t('Tuesday'), (string)$l->t('Wednesday'), (string)$l->t('Thursday'), (string)$l->t('Friday'), (string)$l->t('Saturday'))) ?>;
var monthNames = <?php echo json_encode(array((string)$l->t('January'), (string)$l->t('February'), (string)$l->t('March'), (string)$l->t('April'), (string)$l->t('May'), (string)$l->t('June'), (string)$l->t('July'), (string)$l->t('August'), (string)$l->t('September'), (string)$l->t('October'), (string)$l->t('November'), (string)$l->t('December'))) ?>;
@@ -21,6 +20,13 @@
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
+ <script type="text/javascript">
+ requesttoken = '<?php echo $_['requesttoken']; ?>';
+ OC.EventSource.requesttoken=requesttoken;
+ $(document).bind('ajaxSend', function(elm, xhr, s) {
+ xhr.setRequestHeader('requesttoken', requesttoken);
+ });
+ </script>
<?php foreach($_['headers'] as $header): ?>
<?php
echo '<'.$header['tag'].' ';