Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

UsersController login action responds 500 Internal Server Error #3458

Closed
blasvicco opened this issue Nov 9, 2018 · 1 comment
Closed

UsersController login action responds 500 Internal Server Error #3458

blasvicco opened this issue Nov 9, 2018 · 1 comment

Comments

@blasvicco
Copy link
Contributor

Description

The /src/controllers/UsersController.php:actionLogin() result in Internal Server Error when the form submission doesn't post the field loginName.

TypeError: Argument 1 passed to craft\services\Users::getUserByUsernameOrEmail() must be of the type string, null given, called in /var/www/app/vendor/craftcms/cms/src/controllers/UsersController.php on line 128 and defined in /var/www/app/vendor/craftcms/cms/src/services/Users.php:165
Stack trace:
#0 /var/www/app/vendor/craftcms/cms/src/controllers/UsersController.php(128): craft\services\Users->getUserByUsernameOrEmail(NULL)
#1 [internal function]: craft\controllers\UsersController->actionLogin()
#2 /var/www/app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /var/www/app/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /var/www/app/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('login', Array)
#5 /var/www/app/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('login', Array)
#6 /var/www/app/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('users/#', Array)
#7 /var/www/app/vendor/craftcms/cms/src/web/Application.php(541): craft\web\Application->runAction('users/#', Array)
#8 /var/www/app/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#9 /var/www/app/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#10 /var/www/app/web/index.php(98): yii\base\Application->run()
#11 {main}

Expected behavior

  • Error should be log.
  • 400 Status Code Bad Request Error should be return.

Steps to reproduce

  1. curl -X POST http://your.craft.project.com/?p=/#

Additional info

  • Craft version: 3.0.25
  • PHP version: 7.0.31
@brandonkelly
Copy link
Member

Fixed for tomorrow’s release. Thanks for reporting!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants