You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using v3.0-beta (300.18042501) on PHP 7 CentOS 7.4
I added an CUSTOM FIELD as INTEGER, ENCRYPTED with the name "Conexões Simultâneas" in the Accounts. When I tried to add an account filling this field I received this error. If I don't fill the field it saves normally.
×
There was an error
SyntaxError: Unexpected token S in JSON at position 0parsererror
2018-05-24 21:15:32 - Loaded actions cache
2018-05-24 21:15:36 - ------------
2018-05-24 21:15:36 - Boostrap:web
2018-05-24 21:15:36 - initializeCommon
2018-05-24 21:15:36 - SP\Modules\Web\Init::initialize
2018-05-24 21:15:36 - Loaded icons cache
2018-05-24 21:15:36 - Attach: SP\Providers\Log\LogHandler
2018-05-24 21:15:36 - Attach: SP\Providers\Notification\NotificationHandler
2018-05-24 21:15:36 - Routing call: SP\Modules\Web\Controllers\AccountController::saveEditAction::Array
(
[0] => 3
)
Hello, it has been fixed in the latest commit. It was caused by a recent update of the encryption library which implemented a strict type checking of the data to be encrypted. It needs to be a "string".
I'm using v3.0-beta (300.18042501) on PHP 7 CentOS 7.4
I added an CUSTOM FIELD as INTEGER, ENCRYPTED with the name "Conexões Simultâneas" in the Accounts. When I tried to add an account filling this field I received this error. If I don't fill the field it saves normally.
×
There was an error
SyntaxError: Unexpected token S in JSON at position 0parsererror
2018-05-24 21:15:32 - Loaded actions cache
2018-05-24 21:15:36 - ------------
2018-05-24 21:15:36 - Boostrap:web
2018-05-24 21:15:36 - initializeCommon
2018-05-24 21:15:36 - SP\Modules\Web\Init::initialize
2018-05-24 21:15:36 - Loaded icons cache
2018-05-24 21:15:36 - Attach: SP\Providers\Log\LogHandler
2018-05-24 21:15:36 - Attach: SP\Providers\Notification\NotificationHandler
2018-05-24 21:15:36 - Routing call: SP\Modules\Web\Controllers\AccountController::saveEditAction::Array
(
[0] => 3
)
2018-05-24 21:15:36 - Loaded actions cache
2018-05-24 21:15:37 - Routing error: String expected for argument 1. Integer given instead.
2018-05-24 21:15:37 - Routing error: #0 /var/www/html/syspass/lib/SP/Core/Crypt/Crypt.php(59): Defuse\Crypto\Crypto::encrypt(200, Object(Defuse\Crypto\Key))
#1 /var/www/html/syspass/lib/SP/Services/CustomField/CustomFieldService.php(199): SP\Core\Crypt\Crypt::encrypt(200, 'def10000def5020...', '$fkfdOfYc@xeVoo...')
#2 /var/www/html/syspass/lib/SP/Services/CustomField/CustomFieldService.php(178): SP\Services\CustomField\CustomFieldService->setSecureData(Object(SP\DataModel\CustomFieldData))
#3 /var/www/html/syspass/lib/SP/Services/CustomField/CustomFieldService.php(133): SP\Services\CustomField\CustomFieldService->create(Object(SP\DataModel\CustomFieldData))
#4 /var/www/html/syspass/app/modules/web/Controllers/Traits/ItemTrait.php(169): SP\Services\CustomField\CustomFieldService->update(Object(SP\DataModel\CustomFieldData))
#5 /var/www/html/syspass/app/modules/web/Controllers/AccountController.php(719): SP\Modules\Web\Controllers\AccountController->updateCustomFieldsForItem(10, 3)
#6 [internal function]: SP\Modules\Web\Controllers\AccountController->saveEditAction(3)
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(239): call_user_func_array(Array, Array)
#8 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCollection\RouteCollection), Array)
#9 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure), Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCollection\RouteCollection), Array)
#10 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route), Object(Klein\DataCollection\RouteCollection), Array)
#11 /var/www/html/syspass/lib/SP/Bootstrap.php(446): Klein\Klein->dispatch()
#12 /var/www/html/syspass/lib/Base.php(74): SP\Bootstrap::run(Object(DI\Container))
#13 /var/www/html/syspass/index.php(28): require('/var/www/html/s...')
#14 {main}
The text was updated successfully, but these errors were encountered: