Skip to content
Snippets Groups Projects
Commit 9d846ff4 authored by Christopher Smith's avatar Christopher Smith
Browse files

escaping backslash should be included in split items

parent 6c8c1f46
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest {
$test_line = $userpass.$escaped.$other_user_data;
$result = $this->auth->splitUserData($test_line);
$this->assertEquals($testname, $result[2]);
$this->assertEquals($escaped, $result[2]);
}
}
......
......@@ -356,9 +356,12 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
$row = array();
$piece = '';
for($i=0; $i<strlen($line); $i++){
$len = strlen($line);
for($i=0; $i<$len; $i++){
if ($line[$i]=='\\'){
$piece .= $line[$i];
$i++;
if ($i>=$len) break;
} else if ($line[$i]==':'){
$row[] = $piece;
$piece = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment