]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Avoid / in feed token
authorJeremy <jeremy.benoist@gmail.com>
Wed, 1 Apr 2015 19:54:22 +0000 (21:54 +0200)
committerJeremy <jeremy.benoist@gmail.com>
Wed, 1 Apr 2015 19:59:13 +0000 (21:59 +0200)
Of course, it breaks the url and the route matcher for each feed route

src/Wallabag/CoreBundle/Tools/Utils.php

index de97c796bda9f54d2ebc104439465a5864c23f22..8fa7449173bb3042abf4950b62278a11e2b418d2 100644 (file)
@@ -22,6 +22,7 @@ class Utils
             $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20);
         }
 
-        return str_replace('+', '', $token);
+        // remove character which can broken the url
+        return str_replace(array('+', '/'), '', $token);
     }
 }