Skip to content

Commit 19b7c61

Browse files
committed
fix: Fixed redirect_to URL encoding when params are present
1 parent 32cad72 commit 19b7c61

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,19 @@ jobs:
2727
2828
- run: mkdir build
2929

30+
3031
- name: Create artifact
3132
uses: montudor/[email protected]
3233
with:
3334
args: zip -X -r build/wp-openid-siu-upm.zip . -x *.git* node_modules/\* .* "*/\.*" CODE_OF_CONDUCT.md CONTRIBUTING.md ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md *.dist composer.* dev-helpers** build**
3435

3536
- name: Upload artifact
36-
uses: actions/upload-artifact@v2
37+
uses: actions/upload-artifact@v3
3738
with:
38-
name: wp-openid
39+
name: wp-openid-siu-upm
3940
path: build/wp-openid-siu-upm.zip
4041

42+
4143
- name: Update CHANGELOG
4244
id: changelog
4345
uses: requarks/changelog-action@v1

OpenID.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function login_redirect(): bool
199199
$code_challenge = rtrim(strtr(base64_encode($hash), '+/', '-_'), '=');
200200

201201
// Capture the redirect_to parameter
202-
$redirect_to = isset($_REQUEST['redirect_to']) ? esc_url($_REQUEST['redirect_to']) : home_url();
202+
$redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : home_url();
203203

204204
// Store the redirect_to URL in a session or a transitory option
205205
set_transient('openid_redirect_to', $redirect_to, 3600); // Store for 1 hour

0 commit comments

Comments
 (0)