View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024496 | mantisbt | wiki | public | 2018-05-29 12:00 | 2018-06-06 00:44 |
Reporter | rk4n3 | Assigned To | community | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.14.0 | ||||
Target Version | 2.15.0 | Fixed in Version | 2.15.0 | ||
Summary | 0024496: URL encoding precludes reasonable wiki root_namespace values | ||||
Description | Many wikis (dokuwiki in particular) include characters in their namespace paths that get re-written by URL-encoding the string. For dokuwiki, the character is a colon (':') ... if the root namespace is to live at a path more than one level deep, the namespace separator has to be preserved in the URL. It wouldn't seem reasonable to confine wiki locations to only one level deep because of this. | ||||
Steps To Reproduce | Using dokuwiki integration, set the $g_wiki_root_namespace configuration variable to a dokuwiki namespace path more than one level deep, such as "my:wiki:area:for:mantis", then try to use the "Wiki" button(s) in Mantis. Its very clear that the resulting URLs are mangled by the URL-encoding. | ||||
Additional Information | I was able to hack my core/classes/MantisCoreWikiPlugin.class.php to fix the issue - everywhere the root_namespace was used, it was separately being URL-encoded, so it was convenient to eliminate the URL-encoding for just that one bit, while preserving the URL-encoding everywhere else. I would suggest that this is correct/proper, as the root_namespace value doesn't seem to be of any risk requiring URL-encoding to avoid. | ||||
Tags | No tags attached. | ||||
I confirm the issue. Given the following config
Clicking on the wiki link opens the following, invalid URL: http://localhost:81/wiki/doku.php?id=space%3Amantis:start instead of http://localhost:81/wiki/doku.php?id=space:mantis:start
Considering that the root namespace can only be defined in config_inc.php, I agree with your suggestion. @rk4n3 would you be willing to submit a GitHub pull request (or patch) with proposed changes for review ? |
|
I'm very happy to :) I also checked for further use of the root_namespace variable, and found it fairly isolated: rk4n3@darkstar:~/src/mantisbt$ find . -type f | grep ".php" | sed "s/^./grep -Hni root_namespace \"&\"/" | bash |
|
MantisBT: master 3a2caa07 2018-06-05 07:16 Committer: dregad Details Diff |
Eliminate URL-encoding of root_namespace This allows use of a root namespace more than one level deep. Prior to this, use of e.g. `root:mantis` as namespace would result in a mangled dokuwiki URL because the colon was encoded to `%3A`. Fixes 0024496 |
Affected Issues 0024496 |
|
mod - core/classes/MantisCoreWikiPlugin.class.php | Diff File |