Compare commits

..

10 Commits

Author SHA1 Message Date
Simon Sessingø a2843d5b1e Merge pull request #702 from skipperbent/v5-development
Version 5.4.1.7
2023-12-11 22:48:25 +01:00
Simon 0634ba79dc Fixed getUrl() not working for home urls. 2023-12-11 22:45:14 +01:00
Simon Sessingø 8923beeacf Merge pull request #700 from skipperbent/v5-development
Version 5.4.1.6
2023-12-09 18:42:00 +01:00
Simon 3534233a76 Fixed included triggering on other request-types than post 2023-12-09 18:39:33 +01:00
Simon Sessingø 2a2152432a Merge pull request #699 from skipperbent/v5-development
Version 5.4.1.5
2023-12-09 05:39:59 +01:00
Simon 0f55480156 Fixed rewrite-route not being executed in rare instances 2023-12-09 05:36:30 +01:00
Simon Sessingø 0b01aa9ba9 Merge pull request #698 from skipperbent/v5-development
Version 5.4.1.4
2023-11-29 01:22:27 +01:00
Simon 99ed44eb1e Fixed setHost nullable value 2023-11-29 01:20:00 +01:00
Simon Sessingø 14c21998e9 Merge pull request #695 from skipperbent/v5-development
Version 5.4.1.3
2023-11-27 08:08:55 +01:00
Simon 565a926bd3 Remove port from hostname 2023-11-27 08:06:35 +01:00
4 changed files with 8 additions and 8 deletions
@@ -98,7 +98,7 @@ class BaseCsrfVerifier implements IMiddleware
*/
public function handle(Request $request): void
{
if ($this->skip($request) === false && ($request->isPostBack() === true || $this->isIncluded($request) === true)) {
if ($this->skip($request) === false && ($request->isPostBack() === true || $request->isPostBack() === true && $this->isIncluded($request) === true)) {
$token = $request->getInputHandler()->value(
static::POST_KEY,
+5
View File
@@ -405,6 +405,11 @@ class Request
*/
public function setHost(?string $host): void
{
// Strip any potential ports from hostname
if (strpos((string)$host, ':') !== false) {
$host = strstr($host, strrchr($host, ':'), true);
}
$this->host = $host;
}
+2 -6
View File
@@ -72,7 +72,7 @@ class Url implements JsonSerializable
public function parse(?string $url, bool $setOriginalPath = false): self
{
if ($url !== null && $url !== '/') {
if ($url !== null) {
$data = $this->parseUrl($url);
$this->scheme = $data['scheme'] ?? null;
@@ -95,6 +95,7 @@ class Url implements JsonSerializable
$this->setQueryString($data['query']);
}
}
return $this;
}
@@ -164,11 +165,6 @@ class Url implements JsonSerializable
*/
public function setHost(string $host): self
{
// Strip any potential ports from hostname
if (strpos($host, ':') !== false) {
$host = strstr($host, strrchr($host, ':'), true);
}
$this->host = $host;
return $this;
-1
View File
@@ -562,7 +562,6 @@ class Router
if ($this->request->getRewriteRoute() !== null) {
$this->processedRoutes[] = $this->request->getRewriteRoute();
$this->request->setHasPendingRewrite(false);
}
return $this->routeRequest();