-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
context
When using the extension on FIPS-enabled systems, hashlib.md5 fails (update_css_js:70) due to security reasons.
expectation
The hashing should work, independently of FIPS being enabled or not.
bug
The following exception is encountered instead:
Extension error (sphinx_design.extension):
Handler <function update_css_js at 0x7f44aa9b9280> for event 'builder-inited' threw an exception (exception: [digital envelope routines] unsupported)problem
This is a problem for users generating documentation on these systems.
solutions
Changing the algorithm, or adding usedforsecurity=Flag kwarg seems to solve the issue.
hash = hashlib.md5(content.encode("utf8"), usedforsecurity=False).hexdigest()or
hash = hashlib.sha256(content.encode("utf8")).hexdigest()Reproduce the bug
- Enable FIPS on your system
- Try to generate documentation using
sphinx-design - Generation fails
List your environment
Standard python-3.9.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working