mookim

mookim

mookim.eth

修復superset默認的key CVE-2023-27524

Reference: https://www.theregister.com/2023/04/25/apache_superset_cve/

superset's old version defaults to using "\2\1thisismyscretkey\1\2\\e\\y\\y\\h" as the encryption key for sessions and database table encryption, while the new version has changed it to 'USE_YOUR_OWN_SECURE_RANDOM_KEY'

After modifying this value in superset/config.py, it was found that the application was not functioning properly, reporting that the database could not be decrypted. After finding the commit mentioned in the article, it was discovered that SecretsMigrator was introduced to migrate data tables.

To correctly fix the old version, the following steps need to be taken:

  1. Modify SECRET_KEY in config.py
  2. Add a line PREVIOUS_SECRET_KEY="\2\1thisismyscretkey\1\2\e\y\y\h"
  3. Overwrite utils/encrypt: wget https://github.com/apache/superset/blob/412189fcb73268ddd4829d2fdb8381c5e47595ce/superset/utils/encrypt.py
  4. Modify superset/cli.py according to this commit
  5. Execute superset re-encrypt-secrets
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。