]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove uneeded `strip_tags`
authorLukas Reschke <lukas@statuscode.ch>
Sat, 19 Jul 2014 08:17:24 +0000 (10:17 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 22 Jul 2014 13:39:34 +0000 (15:39 +0200)
This `strip_tags` seems to be completely unneeded and will cause problems with passwords containing stripped characters. (e.g. `<` or `>`)

Needs https://github.com/owncloud/core/pull/9735 to be merged first.

lib/base.php

index 24381611001e68a406b8f199d5709f2efc47ba73..730cee5231d21a22462c4791902e397c7139d8db 100644 (file)
@@ -807,8 +807,8 @@ class OC {
                foreach ($vars as $var) {
                        if (isset($_SERVER[$var]) && preg_match('/Basic\s+(.*)$/i', $_SERVER[$var], $matches)) {
                                list($name, $password) = explode(':', base64_decode($matches[1]), 2);
-                               $_SERVER['PHP_AUTH_USER'] = strip_tags($name);
-                               $_SERVER['PHP_AUTH_PW'] = strip_tags($password);
+                               $_SERVER['PHP_AUTH_USER'] = $name;
+                               $_SERVER['PHP_AUTH_PW'] = $password;
                                break;
                        }
                }