nihgwu / hexo-hey

an admin plugin for hexo
http://nihgwu.github.io/hexo-hey/
MIT License
208 stars 39 forks source link

User and password not match if one of them are pure number #29

Open fengchao opened 8 years ago

fengchao commented 8 years ago
  1. Set name: hexo, password: 123.
  2. Login and input hexo and 123
  3. Login fail.

Reason: in src/api/api.js, the match is checked by if (name === user.name && password === user.password) {

both password and user.password is 123, but one of it are number while the other are text.

Change it to below fix the issue. if (name == user.name && password == user.password) {

nihgwu commented 8 years ago

thanks, i'll make a new release then