- ๐จ๐ฆCanada alireza.tayari Ontario
alireza.tayari โ made their first commit to this issueโs fork.
- Assigned to uttam
- Status changed to Needs work
5 months ago 7:03am 12 July 2024 have applied patch #7, but the error persists: "InvalidArgumentException: The user-entered string 'node/2' must begin with a '/', '?', or '#'. in Drupal\Core\Url::fromUserInput() (line 216 of core/lib/Drupal/Core/Url.php)." I believe we need to add validation in
RedirectUrlSettingsForm.php
. Moving this to NW and assigning it to myself.- Merge request !143251610-login-logout-redirect: Adds validation to the redirect url settings form. โ (Open) created by uttam
- Issue was unassigned.
- Status changed to Needs review
5 months ago 10:30am 12 July 2024 I updated the validateForm method by adding a check to ensure that the redirect_url starts with '/', '?', or '#'. If it doesn't, an error message is set for the corresponding form element, indicating that the redirect URL for the specified role must begin with one of these characters. The other existing code logic remain unchanged.
Please review this.- Status changed to RTBC
3 months ago 7:02am 14 August 2024 - ๐ฎ๐ณIndia atul_ghate
Hi
I have reproduced the issue successfully...
I have tested MR 14 on the Drupal 10 version,
The MR is applied cleanly and it resolved the mentioned issue.Test Result:
Now we can get the error messgae when we add wrong Invalid paths to the login and logout field and module working as expected.
Attaching Screenshots for referenceRTBC+1
- ๐ง๐ชBelgium JeroenT ๐ง๐ช
Tests are still failing:
https://git.drupalcode.org/project/login_redirect_per_role/-/pipelines/2...