Jump to content
thirty bees forum
  • 0

500 Server Error when trying to creat new customer account


Question

Posted

Hi

Trying to create a new customer account gives me a 500 Server Error with the following decrypted exception

ThirtyBeesException

Property Customer->passwd length (60) must be between 0 and 50
at line 1022 in file classes/ObjectModel.php
php 1017. } 1018. 1019. $message = $this->validateField($field, $this->$field); 1020. if ($message !== true) { 1021. if ($die) { 1022. => throw new PrestaShopException($message); 1023. } 1024. 1025. return $errorReturn ? $message : false; 1026. } 1027. }
- ObjectModelCore->validateFields - [line 321 - classes/ObjectModel.php]
php 316. * @since 1.0.0 317. * @version 1.0.0 Initial version 318. */ 319. public function getFields() 320. { 321. => $this->validateFields(); 322. $fields = $this->formatFields(static::FORMAT_COMMON); 323. 324. // For retro compatibility 325. if (Shop::isTableAssociated($this->def['table'])) { 326. $fields = array_merge($fields, $this->getFieldsShop());
- ObjectModelCore->getFields - [line 585 - classes/ObjectModel.php]
php 580. 581. // Database insertion 582. if (Shop::checkIdShopDefault($this->def['table'])) { 583. $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $idShopList) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($idShopList); 584. } 585. => $fields = $this->getFields(); 586. if (!$result = Db::getInstance()->insert($this->def['table'], $fields, $nullValues)) { 587. return false; 588. } 589. 590. // Get object id in database
- ObjectModelCore->add - [line 496 - classes/Customer.php]
- [2 Arguments]
php 491. 492. /* Can't create a guest customer, if this feature is disabled */ 493. if ($this->is_guest && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) { 494. return false; 495. } 496. => $success = parent::add($autoDate, $nullValues); 497. $this->updateGroup($this->groupBox); 498. 499. return $success; 500. } 501.
Argument [0] 1 Argument [1] 1
- CustomerCore->add - [line 507 - controllers/front/AuthController.php]
php 502. // New Guest customer 503. $customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0); 504. $customer->active = 1; 505. 506. if (!count($this->errors)) { 507. => if ($customer->add()) { 508. if (!$customer->is_guest) { 509. if (!$this->sendConfirmationMail($customer)) { 510. $this->errors[] = Tools::displayError('The email cannot be sent.'); 511. } 512. }
- AuthControllerCore->processSubmitAccount - [line 299 - controllers/front/AuthController.php]
php 294. if (Tools::isSubmit('SubmitCreate')) { 295. $this->processSubmitCreate(); 296. } 297. 298. if (Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount')) { 299. => $this->processSubmitAccount(); 300. } 301. 302. if (Tools::isSubmit('SubmitLogin')) { 303. $this->processSubmitLogin(); 304. }
- AuthControllerCore->postProcess - [line 355 - classes/controller/Controller.php]
php 350. if ($this->checkAccess()) { 351. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 352. $this->setMedia(); 353. } 354. 355. => $this->postProcess(); 356. 357. if (!empty($this->redirect_after)) { 358. $this->redirect(); 359. } 360.
- ControllerCore->run - [line 743 - classes/Dispatcher.php]
php 738. if (isset($paramsHookActionDispatcher)) { 739. Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 740. } 741. 742. // Running controller 743. => $controller->run(); 744. } catch (PrestaShopException $e) { 745. $e->displayMessage(); 746. } 747. } 748.
- DispatcherCore->dispatch - [line 33 - index.php]
php 28. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 29. * PrestaShop is an internationally registered trademark & property of PrestaShop SA 30. */ 31. 32. require(dirname(__FILE__).'/config/config.inc.php'); 33. => Dispatcher::getInstance()->dispatch();

I'm not sure what to do to try and fix this. Does anyone have any ideas?

Thanks

17 answers to this question

Recommended Posts

  • 0
Posted

Thanks for the report, @Boyd. Moved this to the bug reports section as it's obviously a bug.

Please look at Backoffice -> Advanced Parameters -> Performance, there's a panel "Ciphering". What is set ciphering to (PHP Encryption or Rijndael or BlowFish)?

Also, if you could share the password used it'd help debugging this.

  • 0
Posted

Thanks for the reply @Traumflug . Ciphering is set to "Use Rijndael with mcrypt lib" The code that comes up is +MabgVNocsIE5AbVOJ5TGGrSxoq5VZR0e0EHdkYup9Q2xqfTr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yg2aLIWQdSRn8ZKfSxdrAReN4XVNw8NylokJFeEQkSSScYglg3cD1WD3d7N8z9VKBrp9Bzn6ZokarW46uCnRJ+zjOPzrhWe6VKdCNZqdyt+nWjrgJ/xHZmk9mOMGMywTOKvLZN10C8j2e39Cwb61FxizZP3NsMHqBuJHIJZZgZAsIZVy6X8+abKwMXxhpifNgGZa7pqbEAENb+lGXTMlFy7vFoEXKKS6u+xf8YtwoDVEGRjyCRIH2iU0TfkJPcWquUuiz7NiHxNInMZooEO005083

  • 0
Posted

@boyd said in 500 Server Error when trying to creat new customer account:

I’m not sure what to do to try and fix this. Does anyone have any ideas? Thanks

At the top it says a 60 character password was used but the limit is 50 characters.

It's definitely a bug that 30bz didn't handle the extra length gracefully but you should be able to create the account with a password that is 50 characters or less until the bug is fixed.

  • 0
Posted

@dynambee the password I was trying to use was well under 60 characters. I have tried to make accounts with passwords between 5 - 8 characters, but the same error has come up. Thanks

  • 0
Posted

@boyd, interesting.

@Traumflug asked if you could share some of the passwords you used as that may help for debugging purposes.

Also, was this a fresh 30bz install or was it a migration from PS? If a migration, from which version of PS?

  • 0
Posted

@dynambee it was a migration from prestashop 1.6.1.17. Some of the passwords I tried were qwerty, qwerty12, login, zxcbnm.

  • 0
Posted

@mdekker , ok I have figured out what was causing it. I forgot I had the module "Password recovery & High Security Password Storage v1.1.1 - by MADEF IT". Once I deleted that everything works. I am so sorry for wasting your time. But I really appreciate the help.

  • 0
Posted

Glad to see you got this solved, @Boyd.

It's not too surprising that even short passwords expose the problem, because passwords are stored encrypted and many encryption mechanisms generate an encrypted string of constant length.

All the encryption stuff is in need of an overhaul anyways, because PHP 7.1 now officially deprecated the mcrypt extension, the current default encryption mechanism. And there are three different encryption mechanisms while two are sufficient (a non-reversible one for passwords and a reversible one for cookies and exception reports). This is tracked here: https://github.com/thirtybees/thirtybees/issues/386

  • 0
Posted

Hi.

I got the same problem, ERROR 500. I copied some sql tables(including client ones) to new installation. And I run again to this siret and ape problem. I use siret as company registration number, but there is hard coded siret and ape validation in classes/validate.php So this ape and siret validation must be comment out, because this registration number is in different length. After this everything works again.

  • 0
Posted

Hi.

I have now the same pb (migration from PS 1.6 to TB1.1.x).

Before sending detailled logs, just a few steps :

  1. while creating new account to checkout,  this 500 error occurs : "Property Customer->passwd length (60) must be between 0 and 32"
  2. When "Disable non thirty bees modules " and "Disable all ovrrides" are set to YES, the error disappears and everything is fine.
  3. BUT, reCapcha needs overrides and is not TB module, and I really need reCaptcha (@qq.com attacks).

Could you telle me how to get rid of this mess ? This is the last thing to do before finishing rescueing my store...

Thanks !

JMarc

 

  • 0
Posted

You need to figure out which override is causing this, and if you need it for anything. Most probably not...

Look if there is override/classes/Tools.php file. If so, look inside... I bet hash method will be overwritten, for some reason...

  • 0
Posted

Thank you for replying so quickly !

There I have a classes/Tools.php. Mmmm, difficult for me to have an idea of what I'm looking for...

Would you be so kind to take a look ?

I've found some lines about passwd generation and encryption, but I can't give any conclusion about it...

Thanks !

JMarc

Tools.php

  • 0
Posted
6 minutes ago, JMarc Legrand said:

Thank you for replying so quickly !

There I have a classes/Tools.php. Mmmm, difficult for me to have an idea of what I'm looking for...

Would you be so kind to take a look ?

I've found some lines about passwd generation and encryption, but I can't give any conclusion about it...

Thanks !

JMarc

Tools.php 161.51 kB · 1 download

This doesn't look like an override -- did you attached file from /override/... directory?

  • 0
Posted (edited)

oh no... what a jerk I am!

OK, I think this is the the line in /override/classes/Customer.php :

'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32),

 

Customer.php

Edited by JMarc Legrand
  • 0
Posted

You should delete this whole override file. I don't see any reason for it to exist, other than screw your store. Especially since there isn't any module reference.

Once you delete it, don't forget to remove /cache/class_index.php file as well

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...