Jonathan Posted June 8, 2015 Report Posted June 8, 2015 Any username, be it a username or an email address, which starts with a number cannot login to Blesta at all.
Jonathan Posted June 8, 2015 Author Report Posted June 8, 2015 I've verified this in two different Blesta installs. One 3.4.3, one 3.5.0 b4.
Tyson Posted June 8, 2015 Report Posted June 8, 2015 Could you provide more information as described in How to Report a Bug? I am able to login with usernames beginning with numbers. I do notice a strange issue if a username begins with "1", but that is a very specific case. What username(s) are you having a problem with? Michael 1
Jonathan Posted June 8, 2015 Author Report Posted June 8, 2015 Went back and tested again and I guess I fat-fingered 3.4.3. I can still recreate it in 3.5b4. Create a client "use email as username" Change the email to something start with a number. I used "123test@gmail.com". You can also create a contact and set a simliar username to recreate it. Error: "No matches found for that user/password combination." Found at /client/login Blesta 3.5.0b4. PHP 5.6.9 (cli) (built: May 15 2015 09:40:22)Copyright © 1997-2015 The PHP GroupZend Engine v2.6.0, Copyright © 1998-2015 Zend Technologies with the ionCube PHP Loader + Intrusion Protection from ioncube24.com (disabled) v5.0.7, Copyright © 2002-2015, by ionCube Ltd. with Zend OPcache v7.0.4-dev, Copyright © 1999-2015, by Zend Technologies mysql Ver 15.1 Distrib 10.0.19-MariaDB, for Linux (x86_64) using readline 5.1nginx version: nginx/1.8.0built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)built with OpenSSL 1.0.1e-fips 11 Feb 2013TLS SNI support enabledconfigure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
Tyson Posted June 8, 2015 Report Posted June 8, 2015 Thanks for the info. I tried "123test@gmail.com" and was able to login successfully, so there may be something else going on. In any case, I'll look into it and see if there is anything out of the ordinary.
Michael Posted June 8, 2015 Report Posted June 8, 2015 Worked for me on both username and email address: http://screencast.com/t/MlcQwERNfa
Jonathan Posted June 8, 2015 Author Report Posted June 8, 2015 Worked for me on both username and email address: http://screencast.com/t/MlcQwERNfa Is this on b4? Everything in the database for the user looks perfect, that's what I don't get. The username just will not work. Change it back to one not starting with a number, DB gets updated as you'd expect to update users.username and then it does work.
Tyson Posted June 8, 2015 Report Posted June 8, 2015 This is fixed in CORE-1700 for v3.5. If you want to pre-patch it yourself, open /app/models/users.php, then find and replace: $this->Record->select(array("users.*"))->from("users")-> open()-> where("users.id", "=", $username)-> orWhere("users.username", "=", $vars['username'])-> close(); with: $this->Record->select(array("users.*"))->from("users")-> open()-> where("users.username", "=", $vars['username']); if (is_numeric($username)) { $this->Record->orWhere("users.id", "=", $username); } $this->Record->close(); Blesta Addons and Michael 2
Recommended Posts