SecurityInnovation/AuthMatrix

Support umlauts in user names on export

CFPrulez opened this issue · 0 comments

Issue

User names are not base64 encoded when being exported/saved. If a user name contains special characters (e.g., German umlauts like ö, ä, ü), saving the state will no longer work due to an UnicodeDecodeError.

Steps to reproduce

  1. Set the username to Test ö Crash.
  2. Click on Save and try to save.

Stacktrace

Traceback (most recent call last):
  File "C:\Users\<snip>\AppData\Roaming\BurpSuite\bapps\30d8ee9f40c041b0bfec67441aad158e\AuthMatrix.py", line 705, in saveClick
    jsonValue = self._db.getSaveableJson()
  File "C:\Users\<snip>\AppData\Roaming\BurpSuite\bapps\30d8ee9f40c041b0bfec67441aad158e\AuthMatrix.py", line 1865, in getSaveableJson
    return json.dumps(stateDict)
  File "C:\Users\<snip>\Programme\BurpSuite\jython-standalone-2.7.0.jar\Lib\json\__init__.py", line 243, in dumps
  File "C:\Users\<snip>\Programme\BurpSuite\jython-standalone-2.7.0.jar\Lib\json\encoder.py", line 206, in encode
  File "C:\Users\<snip>\Programme\BurpSuite\jython-standalone-2.7.0.jar\Lib\json\encoder.py", line 269, in iterencode
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 5-8: invalid data