View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037257 | mantisbt | ui | public | 2026-06-15 11:43 | 2026-07-01 07:53 |
| Reporter | raspopov | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.3.0 | ||||
| Target Version | 2.28.4 | Fixed in Version | 2.28.4 | ||
| Summary | 0037257: Incorrect identification of a non-default mention tag | ||||
| Description | The bug was discovered by scanning the source code with a custom utility designed to detect instances where variables were incorrectly included in strings, as was the case in 0037250. The mention_api.php file, line 81:
The interesting thing is that there are tests for this feature in MentionParsingTest.php, but the test doesn't cover this case, likely due to a typo in the test:
Most likely, the tag should be at the beginning of the line too, like this:
But the most interesting thing is that even if you fix the test, it will continue to return a false positive! This happens because the test uses the “@” character (by default), and this character is matched by another part of the regular expression | ||||
| Tags | No tags attached. | ||||
|
Fixed and added test. PR: https://github.com/mantisbt/mantisbt/pull/2232 |
|
|
Introduced by MantisBT master-1.3.x dc662052 |
|
|
Commit MantisBT master 83e7ad79 will be back ported to master-2.28 branch, without the changes to the test suite. |
|
|
MantisBT: master-1.3.x dc662052 2016-06-12 13:15 Damien Regad Details Diff |
Use specific regex for parsing mentions It turns out that the current $g_user_login_valid_regex pattern cannot be used as it allows spaces. Furthermore, special handling is required to process e-mail address-like strings. For this reason, a custom regex is built for the purpose of mentions parsing, supporting only a subset of the allowed usernames. Fixes 0021083 |
Affected Issues 0021083, 0037257 |
|
| mod - core/mention_api.php | Diff File | ||
|
MantisBT: master 83e7ad79 2026-06-28 12:20 Committer: community Details Diff |
Fix incorrect mention tag The test for the custom mention tag was added and the existing test was fixed. Fixes 0037257, PR https://github.com/mantisbt/mantisbt/pull/2232 |
Affected Issues 0037257 |
|
| mod - core/mention_api.php | Diff File | ||
| add - tests/Mantis/MentionParsingCustomTest.php | Diff File | ||
| mod - tests/Mantis/MentionParsingTest.php | Diff File | ||
|
MantisBT: master-2.28 fb0d32ab 2026-06-28 12:23 Committer: dregad Details Diff |
Fix incorrect mention tag Backported from commit 83e7ad79c61525bd184dc23679ae74ea6809d771, without the changes to the test suite. Fixes 0037257 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0037257 |
|
| mod - core/mention_api.php | Diff File | ||