View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037133 | mantisbt | ui | public | 2026-05-15 11:07 | 2026-06-03 11:19 |
| Reporter | raspopov | Assigned To | community | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.28.3 | ||||
| Target Version | 2.29.0 | Fixed in Version | 2.29.0 | ||
| Summary | 0037133: The buttons on the “Access Denied” widget may contain incorrect links | ||||
| Description | For example, the “/admin/login_page.php?return=admin%2Findex.php” is converted to “admin/login_page.php?return=admin%2Findex.php” for "Login" button. | ||||
| Steps To Reproduce | The following conditions must be met:
| ||||
| Additional Information | This happens because the root “/” is stripped from relative URLs in the
the variables $t_script_path and $t_script now contain empty strings, and the root “/” is not restored. | ||||
| Tags | No tags attached. | ||||
Oops, I meant that the link for the button should be “/login_page.php?return=admin%2Findex.php”, but because the “/” is missing, it turns into “login_page.php?return=admin%2Findex.php” and since the button is on the “/admin/” page, the full path becomes “/admin/login_page.php?return=admin%2Findex.php”. |
|
|
Nice catch, thanks @raspopov.
Just checking - are you actually setting $g_short_path (because normally you should not), or just stating that it holds |
|
|
By core.php, automatically. |
|
|
I decided to write comprehensive tests for all execution paths within the The patch I proposed fixes one bug but introduces another, albeit a less serious one. When calling the function with the absolute path flag (which wasn’t checked in the tests), the “/” is duplicated — for example, the link “https://localhost/css/default.css” becomes “https://localhost//css/default.css”. I am proposing a new patch to restore the string changed in the previous patch, which also fixes the missing “/” error using a different method. It also resolves the issue of the '$g_short_path' string not being searched for thoroughly enough in the processed path. The new code also removes the double “/” characters where the |
|
|
MantisBT: master ad1be12b 2026-05-17 04:51 Committer: community Details Diff |
Fix the string_sanitize_url() lost slash Fixed an issue where the “/” was missing when rebuilding URLs during sanitization. Fixes 0037133, PR https://github.com/mantisbt/mantisbt/pull/2222 |
Affected Issues 0037133 |
|
| mod - core/string_api.php | Diff File | ||
| mod - tests/Mantis/StringTest.php | Diff File | ||
|
MantisBT: master 2006074b 2026-05-24 15:15 Committer: community Details Diff |
Fix the string_sanitize_url() lost slash again Added comprehensive tests. Fixes 0037133, PR https://github.com/mantisbt/mantisbt/pull/2224 |
Affected Issues 0037133 |
|
| mod - core/string_api.php | Diff File | ||
| mod - tests/Mantis/StringTest.php | Diff File | ||