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|
|Target Version||2.15.0||Fixed in Version||2.15.0|
|Summary||0024496: URL encoding precludes reasonable wiki root_namespace values|
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.
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
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`.
|mod - core/classes/MantisCoreWikiPlugin.class.php||Diff File|
|2018-05-29 12:00||rk4n3||New Issue|
|2018-05-30 04:16||dregad||Assigned To||=> dregad|
|2018-05-30 04:16||dregad||Status||new => confirmed|
|2018-05-30 04:16||dregad||Note Added: 0059973|
|2018-05-30 04:17||dregad||Assigned To||dregad =>|
|2018-05-30 09:10||rk4n3||Note Added: 0059976|
|2018-05-30 09:24||rk4n3||Note Edited: 0059976||View Revisions|
|2018-06-03 06:06||dregad||Relationship added||related to 0017871|
|2018-06-03 06:07||dregad||Note Edited: 0059976||View Revisions|
|2018-06-03 06:14||dregad||Assigned To||=> community|
|2018-06-03 06:14||dregad||Status||confirmed => assigned|
|2018-06-03 06:15||dregad||Target Version||=> 2.15.0|
|2018-06-06 00:23||dregad||Changeset attached||=> MantisBT master 3a2caa07|
|2018-06-06 00:23||dregad||Assigned To||community => dregad|
|2018-06-06 00:23||dregad||Status||assigned => resolved|
|2018-06-06 00:23||dregad||Resolution||open => fixed|
|2018-06-06 00:23||dregad||Fixed in Version||=> 2.15.0|
|2018-06-06 00:39||vboctor||Status||resolved => closed|
|2018-06-06 00:44||vboctor||Assigned To||dregad => community|