History log of /dokuwiki/lib/plugins/authplain/_test/escaping.test.php (Results 1 – 14 of 14)
Revision Date Author Comments
# b346670e 09-Jan-2024 Andreas Gohr <andi@splitbrain.org>

correctly escape comments in user names. fixes #4099


# 93497020 13-Feb-2023 Andreas Gohr <andi@splitbrain.org>

AuthPlain user parsing fix. #3833

This removes workarounds we had for old PCRE versions. All modern PHP
releases should be workable with the Regex we have.

If splitting the user line results in les

AuthPlain user parsing fix. #3833

This removes workarounds we had for old PCRE versions. All modern PHP
releases should be workable with the Regex we have.

If splitting the user line results in less than 5 results, we log an
error and pad the result for further use.

show more ...


# 5f18fdf3 14-Dec-2021 Andreas Gohr <andi@splitbrain.org>

authplain: properly clean user names

The authplain module uses cleanID to clean usernames to make them valid
pagenames. However namespaces should not be used in usernames.

For that cleanUser and cl

authplain: properly clean user names

The authplain module uses cleanID to clean usernames to make them valid
pagenames. However namespaces should not be used in usernames.

For that cleanUser and cleanGroup replaced columns in given names. But
depending on the wiki configuration useslash, semicolons and slashes may
also be used as namespace separators. cleanID would replace those with
colons, reintroducing colons into the names.

The problem was reported in a forum post where spammers tried to
register http addresses as user names:

https://forum.dokuwiki.org/d/19796-spammers-with-in-their-name

Users with colons were correctly saved (the colon is escaped in the user
file) but could probably not login (unless using a slash or semicolon
instead of the colon). Since usernames are cleaned in many places in
DokuWiki, such a logged in user was probably not recognized correctly.

Because of the proper colon escaping when saving the user file, I don't
see any security issue arising from this. Eg. it was not possible to
trip up the user loading mechanism.

Note: Previously created users containing colons can not be deleted via
the user manager, because displayed usernames are cleaned again, which
will remove the colons.

show more ...


# 1c33cec3 04-Feb-2021 Andreas Gohr <andi@splitbrain.org>

add needed type hints for phpunit8

This will break a lot of plugin tests, but can't be avoided


# fdf613b0 11-May-2018 Andreas Gohr <andi@splitbrain.org>

fixed auth plain test


# 5aa905e9 11-May-2018 Andreas Gohr <andi@splitbrain.org>

PSR-2 for authplain plugin


# 55d675c9 11-May-2016 Gerrit Uitslag <klapinklapin@gmail.com>

add phpdocs


# f8095446 01-Apr-2015 Christopher Smith <chris@jalakai.co.uk>

add more plugin groups to authplain test


# 276820f7 10-Jan-2015 Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>

Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com


# 8702de7f 09-Dec-2014 Gerrit Uitslag <klapinklapin@gmail.com>

Merge remote-tracking branch 'origin/master' into scrutinizerissues

Conflicts:
inc/media.php
inc/plugin.php
inc/template.php
lib/plugins/authplain/_test/escaping.test.php
lib/plugins/syntax.php


# 9d846ff4 04-Oct-2014 Christopher Smith <chris@jalakai.co.uk>

escaping backslash should be included in split items


# 6c8c1f46 03-Oct-2014 Christopher Smith <chris@jalakai.co.uk>

Fix for issues 877 & 885 related to a bug in PCRE 6.6


# 7e8500ee 02-Oct-2014 Gerrit Uitslag <klapinklapin@gmail.com>

PHPDocs and some improvements


# f95ecbbf 30-Jun-2014 Angus Gratton <gus@projectgus.com>

authplain: Escape ':' in any data field as '\:'

':' is the field delimiter in the authplain flat text
conf/users.auth.php file, but it's also used as an internal delimiter
for the 'mediawiki' passwo

authplain: Escape ':' in any data field as '\:'

':' is the field delimiter in the authplain flat text
conf/users.auth.php file, but it's also used as an internal delimiter
for the 'mediawiki' password hash format. Currently using this hash
format corrupts the file

This change escapes ':' as '\:' in any field in the users.auth.php
file, and any '\' as '\\'.

Also adds test cases for escaping modes.

show more ...