From: Tim Düsterhus Date: Fri, 15 Apr 2016 20:09:14 +0000 (+0200) Subject: Remove obsolete sessionID constant references X-Git-Tag: 3.0.0_Beta_1~1890 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=772f616ff7a9b80fc02e6e8e685b8c0be4158486;p=GitHub%2FWoltLab%2FWCF.git Remove obsolete sessionID constant references --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 1397b08981..2acd9c03b0 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -357,7 +357,7 @@ WCF.ACP.Package.Installation = Class.extend({ failure: $.proxy(this._failure, this), showLoadingOverlay: false, success: $.proxy(this._success, this), - url: 'index.php?' + $actionName + '/&t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php?' + $actionName + '/&t=' + SECURITY_TOKEN }); }, @@ -1738,7 +1738,7 @@ WCF.ACP.Worker = Class.extend({ }, showLoadingOverlay: false, success: $.proxy(this._success, this), - url: 'index.php?worker-proxy/&t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php?worker-proxy/&t=' + SECURITY_TOKEN }); this._title = title; }, @@ -2393,7 +2393,7 @@ WCF.ACP.Import.Manager = Class.extend({ this._proxy = new WCF.Action.Proxy({ showLoadingOverlay: false, success: $.proxy(this._success, this), - url: 'index.php?worker-proxy/&t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php?worker-proxy/&t=' + SECURITY_TOKEN }); this._redirectURL = redirectURL; @@ -2420,7 +2420,7 @@ WCF.ACP.Import.Manager = Class.extend({ success: $.proxy(function() { window.location = this._redirectURL; }, this), - url: 'index.php?cache-clear/&t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php?cache-clear/&t=' + SECURITY_TOKEN }); }, this)).appendTo($form); diff --git a/wcfsetup/install/files/acp/templates/dataImport.tpl b/wcfsetup/install/files/acp/templates/dataImport.tpl index 2b7d3d2305..1e334981e2 100644 --- a/wcfsetup/install/files/acp/templates/dataImport.tpl +++ b/wcfsetup/install/files/acp/templates/dataImport.tpl @@ -77,7 +77,7 @@ className: 'wcf\\system\\importer\\ImportHandler' }, success: function() { window.location.reload(); }, - url: 'index.php/AJAXInvoke/?t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php/AJAXInvoke/?t=' + SECURITY_TOKEN }); } }); diff --git a/wcfsetup/install/files/acp/templates/exceptionLogView.tpl b/wcfsetup/install/files/acp/templates/exceptionLogView.tpl index 1244022b8a..546e1e3e4f 100644 --- a/wcfsetup/install/files/acp/templates/exceptionLogView.tpl +++ b/wcfsetup/install/files/acp/templates/exceptionLogView.tpl @@ -59,7 +59,6 @@
- {@SID_INPUT_TAG}
{/if} diff --git a/wcfsetup/install/files/acp/templates/labelList.tpl b/wcfsetup/install/files/acp/templates/labelList.tpl index 06b4aaccfe..eeed594a47 100644 --- a/wcfsetup/install/files/acp/templates/labelList.tpl +++ b/wcfsetup/install/files/acp/templates/labelList.tpl @@ -79,7 +79,6 @@
- {@SID_INPUT_TAG} {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/wcfsetup/install/files/acp/templates/tagList.tpl b/wcfsetup/install/files/acp/templates/tagList.tpl index 950879f55f..42832f0ee7 100644 --- a/wcfsetup/install/files/acp/templates/tagList.tpl +++ b/wcfsetup/install/files/acp/templates/tagList.tpl @@ -47,7 +47,6 @@
- {@SID_INPUT_TAG} {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/wcfsetup/install/files/acp/templates/templateDiff.tpl b/wcfsetup/install/files/acp/templates/templateDiff.tpl index 8e51ce0ab0..da05ab4fec 100644 --- a/wcfsetup/install/files/acp/templates/templateDiff.tpl +++ b/wcfsetup/install/files/acp/templates/templateDiff.tpl @@ -46,7 +46,6 @@
- {@SID_INPUT_TAG}
diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 6275b01f85..c008083f71 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1667,7 +1667,7 @@ WCF.Message.Quote.Manager = Class.extend({ this._proxy = new WCF.Action.Proxy({ showLoadingOverlay: false, success: $.proxy(this._success, this), - url: 'index.php/MessageQuote/?t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php/MessageQuote/?t=' + SECURITY_TOKEN }); this._toggleShowQuotes(); diff --git a/wcfsetup/install/files/js/WCF.Poll.js b/wcfsetup/install/files/js/WCF.Poll.js index c2b7096619..4df48bbff0 100644 --- a/wcfsetup/install/files/js/WCF.Poll.js +++ b/wcfsetup/install/files/js/WCF.Poll.js @@ -277,7 +277,7 @@ WCF.Poll.Manager = Class.extend({ this._polls = { }; this._proxy = new WCF.Action.Proxy({ success: $.proxy(this._success, this), - url: 'index.php/Poll/?t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php/Poll/?t=' + SECURITY_TOKEN }); // init polls diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index d4ee88c007..e5fb377b24 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1476,7 +1476,7 @@ WCF.Action.Proxy = Class.extend({ success: null, suppressErrors: false, type: 'POST', - url: 'index.php/AJAXProxy/?t=' + SECURITY_TOKEN + SID_ARG_2ND, + url: 'index.php/AJAXProxy/?t=' + SECURITY_TOKEN aborted: null, autoAbortPrevious: false }, options); @@ -6223,7 +6223,7 @@ WCF.Upload = Class.extend({ this._options = $.extend(true, { action: 'upload', multiple: false, - url: 'index.php/AJAXUpload/?t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php/AJAXUpload/?t=' + SECURITY_TOKEN }, options || { }); this._options.url = WCF.convertLegacyURL(this._options.url); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js b/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js index be699f5561..e0c07e7d0f 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js @@ -39,7 +39,7 @@ define(['AjaxRequest', 'Core', 'ObjectMap'], function(AjaxRequest, Core, ObjectM options.pinData = true; options.callbackObject = callbackObject; - if (!options.url) options.url = 'index.php/AJAXProxy/?t=' + SECURITY_TOKEN + SID_ARG_2ND; + if (!options.url) options.url = 'index.php/AJAXProxy/?t=' + SECURITY_TOKEN request = new AjaxRequest(options); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Upload.js b/wcfsetup/install/files/js/WoltLab/WCF/Upload.js index 2ae6fe9feb..a7bc7f36b6 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Upload.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Upload.js @@ -30,7 +30,7 @@ define(['AjaxRequest', 'Core', 'Dom/ChangeListener', 'Language', 'Dom/Util', 'Do // is true if every file from a multi-file selection is uploaded in its own request singleFileRequests: false, // url for uploading file - url: 'index.php/AJAXUpload/?t=' + SECURITY_TOKEN + SID_ARG_2ND + url: 'index.php/AJAXUpload/?t=' + SECURITY_TOKEN }, options); this._options.url = WCF.convertLegacyURL(this._options.url); diff --git a/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php b/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php index 3cd431d381..02e79e386c 100755 --- a/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php @@ -119,7 +119,7 @@ class InstallPackageAction extends AbstractDialogAction { $application = $statement->fetchObject('wcf\data\application\Application'); // build redirect location - $location = $application->getPageURL() . 'acp/index.php?package-list/' . SID_ARG_2ND_NOT_ENCODED; + $location = $application->getPageURL() . 'acp/index.php?package-list/'; WCF::resetZendOpcache(); diff --git a/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php b/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php index 5f7b4c9141..7993a3f8c9 100644 --- a/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php @@ -135,7 +135,7 @@ class UninstallPackageAction extends InstallPackageAction { $application = $statement->fetchObject('wcf\data\application\Application'); // build redirect location - $location = $application->getPageURL() . 'acp/index.php?package-list/' . SID_ARG_2ND_NOT_ENCODED; + $location = $application->getPageURL() . 'acp/index.php?package-list/'; // show success $this->data = array( diff --git a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php index 890e194052..abd3d3596f 100755 --- a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php @@ -202,18 +202,15 @@ class LoginForm extends AbstractCaptchaForm { $this->saved(); if (!empty($this->url)) { - // append session - if (mb_strpos($this->url, '?') !== false) $this->url .= SID_ARG_2ND_NOT_ENCODED; - else $this->url .= SID_ARG_1ST; HeaderUtil::redirect($this->url); } else { if (RequestHandler::getInstance()->inRescueMode()) { - $path = RouteHandler::getHost() . RouteHandler::getPath() . SID_ARG_1ST; + $path = RouteHandler::getHost() . RouteHandler::getPath(); } else { $application = ApplicationHandler::getInstance()->getActiveApplication(); - $path = $application->getPageURL() . 'acp/' . SID_ARG_1ST; + $path = $application->getPageURL() . 'acp/'; } HeaderUtil::redirect($path); diff --git a/wcfsetup/install/files/lib/form/LoginForm.class.php b/wcfsetup/install/files/lib/form/LoginForm.class.php index 810b2bb45b..2f4caa95c0 100644 --- a/wcfsetup/install/files/lib/form/LoginForm.class.php +++ b/wcfsetup/install/files/lib/form/LoginForm.class.php @@ -97,11 +97,6 @@ class LoginForm extends \wcf\acp\form\LoginForm { if (empty($this->url) || mb_stripos($this->url, '?Login/') !== false) { $this->url = LinkHandler::getInstance()->getLink(); } - // append missing session id - else if (SID_ARG_1ST != '' && !preg_match('/(?:&|\?)s=[a-z0-9]{40}/', $this->url)) { - if (mb_strpos($this->url, '?') !== false) $this->url .= SID_ARG_2ND_NOT_ENCODED; - else $this->url .= SID_ARG_1ST; - } // drop index.php if (!URL_LEGACY_MODE) { diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 7436fb4386..38242873d1 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -153,7 +153,7 @@ class WCFACP extends WCF { // drop session id $redirectURI = preg_replace('~[&\?]s=[a-f0-9]{40}(&|$)~', '', WCF::getSession()->requestURI); - $path = $application->getPageURL() . 'acp/index.php?login/' . SID_ARG_2ND_NOT_ENCODED . '&url=' . rawurlencode(RouteHandler::getProtocol() . $_SERVER['HTTP_HOST'] . $redirectURI); + $path = $application->getPageURL() . 'acp/index.php?login/&url=' . rawurlencode(RouteHandler::getProtocol() . $_SERVER['HTTP_HOST'] . $redirectURI); HeaderUtil::redirect($path); exit; diff --git a/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php b/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php index 65c6813929..9c34b866bc 100644 --- a/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php +++ b/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php @@ -45,23 +45,13 @@ class Breadcrumb { } /** - * Sets the target url, by default appends appropriate session id. + * Sets the target url. * May be left empty to disable url functionality. * * @param string $url - * @param boolean $appendSession + * @param boolean $appendSession This parameter is unused as of WCF 2.2 */ public function setURL($url, $appendSession = false) { - // append session id - if ($appendSession) { - if (mb_strpos($url, '?') === false) { - $url .= SID_ARG_1ST; - } - else { - $url .= SID_ARG_2ND_NOT_ENCODED; - } - } - $this->url = $url; } diff --git a/wcfsetup/setup/template/stepInstallPackages.tpl b/wcfsetup/setup/template/stepInstallPackages.tpl index 59d0bb4cf1..33021807a7 100644 --- a/wcfsetup/setup/template/stepInstallPackages.tpl +++ b/wcfsetup/setup/template/stepInstallPackages.tpl @@ -8,7 +8,6 @@
- {@SID_INPUT_TAG}