summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-07-08 11:22:51 +0200
committerGravatar GitHub <noreply@github.com> 2018-07-08 11:22:51 +0200
commit82ac9454ddf337b79b41fedae37eaf15e6e0cb12 (patch)
treee939dad7e7cadd5311ee60906eff1e993634cf7b
parente0bc6a28553e4109663aef6280a0712d7594a396 (diff)
Fix check username in API (#1957)
* Fix check username in API Fix https://github.com/FreshRSS/FreshRSS/issues/1955 * Changelog 1955 https://github.com/FreshRSS/FreshRSS/issues/1955 https://github.com/FreshRSS/FreshRSS/pull/1957
-rw-r--r--CHANGELOG.md1
-rw-r--r--p/api/greader.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index edf91f8b2..e6f669ebd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
* Update Docker image to Alpine 3.8 with PHP 7.2 [#1956](https://github.com/FreshRSS/FreshRSS/pull/1956)
* Bug fixing
* Fix bugs when searching with special characters (e.g. preventing marking as read) [#1944](https://github.com/FreshRSS/FreshRSS/issues/1944)
+ * Fix username check in API to allow underscores [#1955](https://github.com/FreshRSS/FreshRSS/issues/1955)
* Mics.
* Auto-login after self user creation [#1928](https://github.com/FreshRSS/FreshRSS/issues/1928)
diff --git a/p/api/greader.php b/p/api/greader.php
index 5ab6c8115..4affc2826 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -176,7 +176,7 @@ function authorizationToUser() {
}
function clientLogin($email, $pass) { //http://web.archive.org/web/20130604091042/http://undoc.in/clientLogin.html
- if (ctype_alnum($email)) {
+ if (FreshRSS_user_Controller::checkUsername($email)) {
if (!function_exists('password_verify')) {
include_once(LIB_PATH . '/password_compat.php');
}