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
Using Craft::$app->security->generateRandomKey() as a setting value generated a non supported character breaking the info table. It failed to generate a base64 config string and the unserialised config was broken at the value.
Steps to reproduce
run Craft::$app->plugins->savePluginSettings($this, ['key' => Craft::$app->security->generateRandomKey()] in init()
Additional info
Craft version: 3.1.15
PHP version: 7.2.6
Database driver & version: MySQL 5.7.12
Plugins & versions: custom plugin
The text was updated successfully, but these errors were encountered:
I wasn’t able to reproduce this consistently – many strings returned by generateRandomKey() work just fine – but I could with the following string (base64-encoded):
ITcFFy6t0+k1F6FWtbrmR+IAoNG/oCHiaJfpca9F4zo=
With that (decoded), I was getting an “Incorrect string value” SQL error, because it contains a non-UTF-8 character.
Description
Using
Craft::$app->security->generateRandomKey()
as a setting value generated a non supported character breaking the info table. It failed to generate a base64 config string and the unserialised config was broken at the value.Steps to reproduce
Craft::$app->plugins->savePluginSettings($this, ['key' => Craft::$app->security->generateRandomKey()]
ininit()
Additional info
The text was updated successfully, but these errors were encountered: