[BUGFIX] Bring back the maintenance information message 06/56706/7
authorFrank Naegler <frank.naegler@typo3.org>
Tue, 17 Apr 2018 10:09:17 +0000 (12:09 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 9 Jul 2018 09:31:13 +0000 (11:31 +0200)
In case the adminOnly flag is set, an information window is shown.
The middleware now creates a valid JSON response to show
the information window again.

Resolves: #84765
Releases: master
Change-Id: Ibe36b9d2c06b730bb2687d528d011268af4da660
Reviewed-on: https://review.typo3.org/56706
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Exception/BackendLockedException.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php
typo3/sysext/backend/Resources/Private/TypeScript/LoginRefresh.ts
typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js

diff --git a/typo3/sysext/backend/Classes/Exception/BackendLockedException.php b/typo3/sysext/backend/Classes/Exception/BackendLockedException.php
new file mode 100644 (file)
index 0000000..6942f6c
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+declare(strict_types = 1);
+namespace TYPO3\CMS\Backend\Exception;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Backend\Exception;
+
+class BackendLockedException extends Exception
+{
+}
index 9917ea9..c7e27b3 100644 (file)
@@ -19,7 +19,9 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
+use TYPO3\CMS\Backend\Exception\BackendLockedException;
 use TYPO3\CMS\Core\Core\Environment;
+use TYPO3\CMS\Core\Http\JsonResponse;
 use TYPO3\CMS\Core\Http\RedirectResponse;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -42,9 +44,24 @@ class LockedBackendGuard implements MiddlewareInterface
      */
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
     {
-        $redirectToUri = $this->checkLockedBackend();
-        if (!empty($redirectToUri)) {
-            return new RedirectResponse($redirectToUri, 302);
+        try {
+            $redirectToUri = $this->checkLockedBackend();
+            if (!empty($redirectToUri)) {
+                return new RedirectResponse($redirectToUri, 302);
+            }
+        } catch (BackendLockedException $e) {
+            // Looks like an AJAX request that can handle JSON, (usually from the timeout functionality)
+            // So, let's form a request that fits
+            if (strpos($request->getHeaderLine('Accept'), 'application/json') !== false) {
+                $session = [
+                    'timed_out' => false,
+                    'will_time_out' => false,
+                    'locked' => true,
+                    'message' => $e->getMessage()
+                ];
+                return new JsonResponse(['login' => $session]);
+            }
+            throw $e;
         }
         $this->validateVisitorsIpAgainstIpMaskList(
             $request->getAttribute('normalizedParams')->getRemoteAddress(),
@@ -57,20 +74,20 @@ class LockedBackendGuard implements MiddlewareInterface
     /**
      * Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND
      *
-     * @throws \RuntimeException
      * @return string|null
+     * @throws BackendLockedException
      */
     protected function checkLockedBackend()
     {
         if ($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] < 0) {
-            throw new \RuntimeException('TYPO3 Backend locked: Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] . '".', 1517949794);
+            throw new BackendLockedException('TYPO3 Backend locked: Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] . '".', 1517949794);
         }
         if (@is_file(Environment::getLegacyConfigPath() . '/LOCK_BACKEND')) {
             $fileContent = file_get_contents(Environment::getLegacyConfigPath() . '/LOCK_BACKEND');
             if ($fileContent) {
                 return $fileContent;
             }
-            throw new \RuntimeException('TYPO3 Backend locked: Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.', 1517949793);
+            throw new BackendLockedException('TYPO3 Backend locked: Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.', 1517949793);
         }
     }
 
index f61ac61..5a9b17e 100644 (file)
@@ -439,27 +439,24 @@ class LoginRefresh {
    * and opens a dialog.
    */
   protected checkActiveSession = (): void => {
-    $.ajax({
-      url: TYPO3.settings.ajaxUrls.login_timedout,
-      success: (response) => {
-        if (response.login.locked) {
-          if (!this.backendIsLocked) {
-            this.backendIsLocked = true;
-            this.showBackendLockedModal();
-          }
-        } else {
-          if (this.backendIsLocked) {
-            this.backendIsLocked = false;
-            this.hideBackendLockedModal();
-          }
+    $.getJSON(TYPO3.settings.ajaxUrls.login_timedout, [], (response) => {
+      if (response.login.locked) {
+        if (!this.backendIsLocked) {
+          this.backendIsLocked = true;
+          this.showBackendLockedModal();
         }
+      } else {
+        if (this.backendIsLocked) {
+          this.backendIsLocked = false;
+          this.hideBackendLockedModal();
+        }
+      }
 
-        if (!this.backendIsLocked) {
-          if (response.login.timed_out || response.login.will_time_out) {
-            response.login.timed_out
-              ? this.showLoginForm()
-              : this.showTimeoutModal();
-          }
+      if (!this.backendIsLocked) {
+        if (response.login.timed_out || response.login.will_time_out) {
+          response.login.timed_out
+            ? this.showLoginForm()
+            : this.showTimeoutModal();
         }
       }
     });
index 1f93224..4179ed5 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","TYPO3/CMS/Backend/Notification"],function(o,t,i,e){"use strict";var n,a;(a=n||(n={})).loginrefresh="t3js-modal-loginrefresh",a.lockedModal="t3js-modal-backendlocked",a.loginFormModal="t3js-modal-backendloginform";var s,l=function(){function t(){var o=this;this.options={modalConfig:{backdrop:"static"}},this.webNotification=null,this.intervalTime=60,this.intervalId=null,this.backendIsLocked=!1,this.isTimingOut=!1,this.$timeoutModal=null,this.$backendLockedModal=null,this.$loginForm=null,this.loginFramesetUrl="",this.logoutUrl="",this.checkActiveSession=function(){i.ajax({url:TYPO3.settings.ajaxUrls.login_timedout,success:function(t){t.login.locked?o.backendIsLocked||(o.backendIsLocked=!0,o.showBackendLockedModal()):o.backendIsLocked&&(o.backendIsLocked=!1,o.hideBackendLockedModal()),o.backendIsLocked||(t.login.timed_out||t.login.will_time_out)&&(t.login.timed_out?o.showLoginForm():o.showTimeoutModal())}})}}return t.prototype.initialize=function(){this.initializeTimeoutModal(),this.initializeBackendLockedModal(),this.initializeLoginForm(),this.startTask(),"https:"===document.location.protocol&&"undefined"!=typeof Notification&&"granted"!==Notification.permission&&Notification.requestPermission()},t.prototype.startTask=function(){if(null===this.intervalId){var o=1e3*this.intervalTime;this.intervalId=setInterval(this.checkActiveSession,o)}},t.prototype.stopTask=function(){clearInterval(this.intervalId),this.intervalId=null},t.prototype.setIntervalTime=function(o){this.intervalTime=Math.min(o,86400)},t.prototype.setLogoutUrl=function(o){this.logoutUrl=o},t.prototype.setLoginFramesetUrl=function(o){this.loginFramesetUrl=o},t.prototype.showTimeoutModal=function(){this.isTimingOut=!0,this.$timeoutModal.modal(this.options.modalConfig),this.fillProgressbar(this.$timeoutModal),"https:"===document.location.protocol&&"undefined"!=typeof Notification&&"granted"===Notification.permission&&document.hidden&&(this.webNotification=new Notification(TYPO3.lang["mess.login_about_to_expire_title"],{body:TYPO3.lang["mess.login_about_to_expire"],icon:"/typo3/sysext/backend/Resources/Public/Images/Logo.png"}),this.webNotification.onclick=function(){window.focus()})},t.prototype.hideTimeoutModal=function(){this.isTimingOut=!1,this.$timeoutModal.modal("hide"),"undefined"!=typeof Notification&&null!==this.webNotification&&this.webNotification.close()},t.prototype.showBackendLockedModal=function(){this.$backendLockedModal.modal(this.options.modalConfig)},t.prototype.hideBackendLockedModal=function(){this.$backendLockedModal.modal("hide")},t.prototype.showLoginForm=function(){var o=this;i.ajax({url:TYPO3.settings.ajaxUrls.logout,method:"GET",success:function(){TYPO3.configuration.showRefreshLoginPopup?o.showLoginPopup():o.$loginForm.modal(o.options.modalConfig)}})},t.prototype.showLoginPopup=function(){var o=window.open(this.loginFramesetUrl,"relogin_"+Math.random().toString(16).slice(2),"height=450,width=700,status=0,menubar=0,location=1");o&&o.focus()},t.prototype.hideLoginForm=function(){this.$loginForm.modal("hide")},t.prototype.initializeBackendLockedModal=function(){this.$backendLockedModal=this.generateModal(n.lockedModal),this.$backendLockedModal.find(".modal-header h4").text(TYPO3.lang["mess.please_wait"]),this.$backendLockedModal.find(".modal-body").append(i("<p />").text(TYPO3.lang["mess.be_locked"])),this.$backendLockedModal.find(".modal-footer").remove(),i("body").append(this.$backendLockedModal)},t.prototype.initializeTimeoutModal=function(){var o=this;this.$timeoutModal=this.generateModal(n.loginrefresh),this.$timeoutModal.addClass("modal-severity-notice"),this.$timeoutModal.find(".modal-header h4").text(TYPO3.lang["mess.login_about_to_expire_title"]),this.$timeoutModal.find(".modal-body").append(i("<p />").text(TYPO3.lang["mess.login_about_to_expire"]),i("<div />",{class:"progress"}).append(i("<div />",{class:"progress-bar progress-bar-warning progress-bar-striped active",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100"}).append(i("<span />",{class:"sr-only"})))),this.$timeoutModal.find(".modal-footer").append(i("<button />",{class:"btn btn-default","data-action":"logout"}).text(TYPO3.lang["mess.refresh_login_logout_button"]).on("click",function(){top.location.href=o.logoutUrl}),i("<button />",{class:"btn btn-primary t3js-active","data-action":"refreshSession"}).text(TYPO3.lang["mess.refresh_login_refresh_button"]).on("click",function(){i.ajax({url:TYPO3.settings.ajaxUrls.login_timedout,method:"GET",success:function(){o.hideTimeoutModal()}})})),this.registerDefaultModalEvents(this.$timeoutModal),i("body").append(this.$timeoutModal)},t.prototype.initializeLoginForm=function(){var t=this;if(!TYPO3.configuration.showRefreshLoginPopup){this.$loginForm=this.generateModal(n.loginFormModal),this.$loginForm.addClass("modal-notice");var e=String(TYPO3.lang["mess.refresh_login_title"]).replace("%s",TYPO3.configuration.username);this.$loginForm.find(".modal-header h4").text(e),this.$loginForm.find(".modal-body").append(i("<p />").text(TYPO3.lang["mess.login_expired"]),i("<form />",{id:"beLoginRefresh",method:"POST",action:TYPO3.settings.ajaxUrls.login}).append(i("<div />",{class:"form-group"}).append(i("<input />",{type:"password",name:"p_field",autofocus:"autofocus",class:"form-control",placeholder:TYPO3.lang["mess.refresh_login_password"],"data-rsa-encryption":"t3-loginrefres-userident"})),i("<input />",{type:"hidden",name:"username",value:TYPO3.configuration.username}),i("<input />",{type:"hidden",name:"userident",id:"t3-loginrefres-userident"}))),this.$loginForm.find(".modal-footer").append(i("<a />",{href:this.logoutUrl,class:"btn btn-default"}).text(TYPO3.lang["mess.refresh_exit_button"]),i("<button />",{type:"button",class:"btn btn-primary","data-action":"refreshSession"}).text(TYPO3.lang["mess.refresh_login_button"]).on("click",function(){t.$loginForm.find("form").submit()})),this.registerDefaultModalEvents(this.$loginForm).on("submit",this.submitForm),i("body").append(this.$loginForm),o.specified("TYPO3/CMS/Rsaauth/RsaEncryptionModule")&&o(["TYPO3/CMS/Rsaauth/RsaEncryptionModule"],function(o){o.registerForm(i("#beLoginRefresh").get(0))})}},t.prototype.generateModal=function(o){return i("<div />",{id:o,class:"t3js-modal "+o+" modal modal-type-default modal-severity-notice modal-style-light modal-size-small fade"}).append(i("<div />",{class:"modal-dialog"}).append(i("<div />",{class:"modal-content"}).append(i("<div />",{class:"modal-header"}).append(i("<h4 />",{class:"modal-title"})),i("<div />",{class:"modal-body"}),i("<div />",{class:"modal-footer"}))))},t.prototype.fillProgressbar=function(o){var t=this;if(this.isTimingOut)var i=0,e=o.find(".progress-bar"),n=e.children(".sr-only"),a=setInterval(function(){var o=i>=100;!t.isTimingOut||o?(clearInterval(a),o&&(t.hideTimeoutModal(),t.showLoginForm()),i=0):i+=1;var s=i+"%";e.css("width",s),n.text(s)},300)},t.prototype.submitForm=function(o){var t=this;o.preventDefault();var n=this.$loginForm.find("form"),a=n.find("input[name=p_field]"),s=n.find("input[name=userident]"),l=a.val();if(""===l&&""===s.val())return e.error(TYPO3.lang["mess.refresh_login_failed"],TYPO3.lang["mess.refresh_login_emptyPassword"]),void a.focus();l&&(s.val(l),a.val(""));var r={login_status:"login"};i.each(n.serializeArray(),function(o,t){r[t.name]=t.value}),i.ajax({url:n.attr("action"),method:"POST",data:r,success:function(o){o.login.success?t.hideLoginForm():(e.error(TYPO3.lang["mess.refresh_login_failed"],TYPO3.lang["mess.refresh_login_failed_message"]),a.focus())}})},t.prototype.registerDefaultModalEvents=function(o){var t=this;return o.on("hidden.bs.modal",function(){t.startTask()}).on("shown.bs.modal",function(){t.stopTask(),t.$timeoutModal.find(".modal-footer .t3js-active").first().focus()}),o},t}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.LoginRefresh&&(s=window.opener.TYPO3.LoginRefresh),parent&&parent.window.TYPO3&&parent.window.TYPO3.LoginRefresh&&(s=parent.window.TYPO3.LoginRefresh),top&&top.TYPO3&&top.TYPO3.LoginRefresh&&(s=top.TYPO3.LoginRefresh)}catch(o){}return s||(s=new l,"undefined"!=typeof TYPO3&&(TYPO3.LoginRefresh=s)),s});
\ No newline at end of file
+define(["require","exports","jquery","TYPO3/CMS/Backend/Notification"],function(o,t,i,e){"use strict";var n,a;(a=n||(n={})).loginrefresh="t3js-modal-loginrefresh",a.lockedModal="t3js-modal-backendlocked",a.loginFormModal="t3js-modal-backendloginform";var s,l=function(){function t(){var o=this;this.options={modalConfig:{backdrop:"static"}},this.webNotification=null,this.intervalTime=60,this.intervalId=null,this.backendIsLocked=!1,this.isTimingOut=!1,this.$timeoutModal=null,this.$backendLockedModal=null,this.$loginForm=null,this.loginFramesetUrl="",this.logoutUrl="",this.checkActiveSession=function(){i.getJSON(TYPO3.settings.ajaxUrls.login_timedout,[],function(t){t.login.locked?o.backendIsLocked||(o.backendIsLocked=!0,o.showBackendLockedModal()):o.backendIsLocked&&(o.backendIsLocked=!1,o.hideBackendLockedModal()),o.backendIsLocked||(t.login.timed_out||t.login.will_time_out)&&(t.login.timed_out?o.showLoginForm():o.showTimeoutModal())})}}return t.prototype.initialize=function(){this.initializeTimeoutModal(),this.initializeBackendLockedModal(),this.initializeLoginForm(),this.startTask(),"https:"===document.location.protocol&&"undefined"!=typeof Notification&&"granted"!==Notification.permission&&Notification.requestPermission()},t.prototype.startTask=function(){if(null===this.intervalId){var o=1e3*this.intervalTime;this.intervalId=setInterval(this.checkActiveSession,o)}},t.prototype.stopTask=function(){clearInterval(this.intervalId),this.intervalId=null},t.prototype.setIntervalTime=function(o){this.intervalTime=Math.min(o,86400)},t.prototype.setLogoutUrl=function(o){this.logoutUrl=o},t.prototype.setLoginFramesetUrl=function(o){this.loginFramesetUrl=o},t.prototype.showTimeoutModal=function(){this.isTimingOut=!0,this.$timeoutModal.modal(this.options.modalConfig),this.fillProgressbar(this.$timeoutModal),"https:"===document.location.protocol&&"undefined"!=typeof Notification&&"granted"===Notification.permission&&document.hidden&&(this.webNotification=new Notification(TYPO3.lang["mess.login_about_to_expire_title"],{body:TYPO3.lang["mess.login_about_to_expire"],icon:"/typo3/sysext/backend/Resources/Public/Images/Logo.png"}),this.webNotification.onclick=function(){window.focus()})},t.prototype.hideTimeoutModal=function(){this.isTimingOut=!1,this.$timeoutModal.modal("hide"),"undefined"!=typeof Notification&&null!==this.webNotification&&this.webNotification.close()},t.prototype.showBackendLockedModal=function(){this.$backendLockedModal.modal(this.options.modalConfig)},t.prototype.hideBackendLockedModal=function(){this.$backendLockedModal.modal("hide")},t.prototype.showLoginForm=function(){var o=this;i.ajax({url:TYPO3.settings.ajaxUrls.logout,method:"GET",success:function(){TYPO3.configuration.showRefreshLoginPopup?o.showLoginPopup():o.$loginForm.modal(o.options.modalConfig)}})},t.prototype.showLoginPopup=function(){var o=window.open(this.loginFramesetUrl,"relogin_"+Math.random().toString(16).slice(2),"height=450,width=700,status=0,menubar=0,location=1");o&&o.focus()},t.prototype.hideLoginForm=function(){this.$loginForm.modal("hide")},t.prototype.initializeBackendLockedModal=function(){this.$backendLockedModal=this.generateModal(n.lockedModal),this.$backendLockedModal.find(".modal-header h4").text(TYPO3.lang["mess.please_wait"]),this.$backendLockedModal.find(".modal-body").append(i("<p />").text(TYPO3.lang["mess.be_locked"])),this.$backendLockedModal.find(".modal-footer").remove(),i("body").append(this.$backendLockedModal)},t.prototype.initializeTimeoutModal=function(){var o=this;this.$timeoutModal=this.generateModal(n.loginrefresh),this.$timeoutModal.addClass("modal-severity-notice"),this.$timeoutModal.find(".modal-header h4").text(TYPO3.lang["mess.login_about_to_expire_title"]),this.$timeoutModal.find(".modal-body").append(i("<p />").text(TYPO3.lang["mess.login_about_to_expire"]),i("<div />",{class:"progress"}).append(i("<div />",{class:"progress-bar progress-bar-warning progress-bar-striped active",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100"}).append(i("<span />",{class:"sr-only"})))),this.$timeoutModal.find(".modal-footer").append(i("<button />",{class:"btn btn-default","data-action":"logout"}).text(TYPO3.lang["mess.refresh_login_logout_button"]).on("click",function(){top.location.href=o.logoutUrl}),i("<button />",{class:"btn btn-primary t3js-active","data-action":"refreshSession"}).text(TYPO3.lang["mess.refresh_login_refresh_button"]).on("click",function(){i.ajax({url:TYPO3.settings.ajaxUrls.login_timedout,method:"GET",success:function(){o.hideTimeoutModal()}})})),this.registerDefaultModalEvents(this.$timeoutModal),i("body").append(this.$timeoutModal)},t.prototype.initializeLoginForm=function(){var t=this;if(!TYPO3.configuration.showRefreshLoginPopup){this.$loginForm=this.generateModal(n.loginFormModal),this.$loginForm.addClass("modal-notice");var e=String(TYPO3.lang["mess.refresh_login_title"]).replace("%s",TYPO3.configuration.username);this.$loginForm.find(".modal-header h4").text(e),this.$loginForm.find(".modal-body").append(i("<p />").text(TYPO3.lang["mess.login_expired"]),i("<form />",{id:"beLoginRefresh",method:"POST",action:TYPO3.settings.ajaxUrls.login}).append(i("<div />",{class:"form-group"}).append(i("<input />",{type:"password",name:"p_field",autofocus:"autofocus",class:"form-control",placeholder:TYPO3.lang["mess.refresh_login_password"],"data-rsa-encryption":"t3-loginrefres-userident"})),i("<input />",{type:"hidden",name:"username",value:TYPO3.configuration.username}),i("<input />",{type:"hidden",name:"userident",id:"t3-loginrefres-userident"}))),this.$loginForm.find(".modal-footer").append(i("<a />",{href:this.logoutUrl,class:"btn btn-default"}).text(TYPO3.lang["mess.refresh_exit_button"]),i("<button />",{type:"button",class:"btn btn-primary","data-action":"refreshSession"}).text(TYPO3.lang["mess.refresh_login_button"]).on("click",function(){t.$loginForm.find("form").submit()})),this.registerDefaultModalEvents(this.$loginForm).on("submit",this.submitForm),i("body").append(this.$loginForm),o.specified("TYPO3/CMS/Rsaauth/RsaEncryptionModule")&&o(["TYPO3/CMS/Rsaauth/RsaEncryptionModule"],function(o){o.registerForm(i("#beLoginRefresh").get(0))})}},t.prototype.generateModal=function(o){return i("<div />",{id:o,class:"t3js-modal "+o+" modal modal-type-default modal-severity-notice modal-style-light modal-size-small fade"}).append(i("<div />",{class:"modal-dialog"}).append(i("<div />",{class:"modal-content"}).append(i("<div />",{class:"modal-header"}).append(i("<h4 />",{class:"modal-title"})),i("<div />",{class:"modal-body"}),i("<div />",{class:"modal-footer"}))))},t.prototype.fillProgressbar=function(o){var t=this;if(this.isTimingOut)var i=0,e=o.find(".progress-bar"),n=e.children(".sr-only"),a=setInterval(function(){var o=i>=100;!t.isTimingOut||o?(clearInterval(a),o&&(t.hideTimeoutModal(),t.showLoginForm()),i=0):i+=1;var s=i+"%";e.css("width",s),n.text(s)},300)},t.prototype.submitForm=function(o){var t=this;o.preventDefault();var n=this.$loginForm.find("form"),a=n.find("input[name=p_field]"),s=n.find("input[name=userident]"),l=a.val();if(""===l&&""===s.val())return e.error(TYPO3.lang["mess.refresh_login_failed"],TYPO3.lang["mess.refresh_login_emptyPassword"]),void a.focus();l&&(s.val(l),a.val(""));var r={login_status:"login"};i.each(n.serializeArray(),function(o,t){r[t.name]=t.value}),i.ajax({url:n.attr("action"),method:"POST",data:r,success:function(o){o.login.success?t.hideLoginForm():(e.error(TYPO3.lang["mess.refresh_login_failed"],TYPO3.lang["mess.refresh_login_failed_message"]),a.focus())}})},t.prototype.registerDefaultModalEvents=function(o){var t=this;return o.on("hidden.bs.modal",function(){t.startTask()}).on("shown.bs.modal",function(){t.stopTask(),t.$timeoutModal.find(".modal-footer .t3js-active").first().focus()}),o},t}();try{window.opener&&window.opener.TYPO3&&window.opener.TYPO3.LoginRefresh&&(s=window.opener.TYPO3.LoginRefresh),parent&&parent.window.TYPO3&&parent.window.TYPO3.LoginRefresh&&(s=parent.window.TYPO3.LoginRefresh),top&&top.TYPO3&&top.TYPO3.LoginRefresh&&(s=top.TYPO3.LoginRefresh)}catch(o){}return s||(s=new l,"undefined"!=typeof TYPO3&&(TYPO3.LoginRefresh=s)),s});
\ No newline at end of file