Re: Strange characters in names of users and groups

From: Date: Thu, 19 Dec 2024 09:40:37 +0000
Subject: Re: Strange characters in names of users and groups
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-328590@lists.php.net to get a copy of this message
On 19/12/2024 09:11, Christoph Pleger wrote:
Hello, I am using dokuwiki, a WIKI programmed in PHP and I have the problem that, in spite of the granted access rights inside DokuWiki, , members of a certain user group are not able to access parts of the Wiki they should be able to access. To find the cause of the problem, I added some lines to the DokuWiki code to get get more debug ouput. So, from the login, I get the following debug ouput: user = christoph.pleger groups = prof But from checking if the logged in user has access rights for a specific Wiki document, I get the following debug output: user = christoph%2epleger groups = prof%a So, my suspicion is that the problem is caused by those strange character sequences "%2e" and "%a". What can be done to remove them an get the same user and groups strings as above? Regards   Christoph
The %<digits> encoding is RFC 3986 URI Percent Encoding[0]. The php functions urlencode() and rawurlencode() can be used to perform this, tho neither of these will encode '.' (%2e) (because it's an unreserved character[1]). The %a should almost certainly be %0a (because % is supposed to always be followed by exactly 2 hex digits) which represents a newline ("\n") Given these, it looks like a custom-written encoding function has been used. Assuming you haven't written any custom code modifications, whether or not any of this is expected, or is the root of your overall problem with access rights would be a query for the dokuwiki project and/or the developers of any relevant plugins you may have installed. [0] https://datatracker.ietf.org/doc/html/rfc3986#section-2.1 [1] https://datatracker.ietf.org/doc/html/rfc3986#section-2.3

« previous php.general (#328590) next »