Open ryno75 opened 10 months ago
Hi @ryno75, that sounds like a great improvement! Feel free to open a PR.
Given the length of the hashes are different, I'd say there's no risk of existing users facing clashes with their old cookies files.
Also, I see you are using Python 3.6, while only 3.7 and above are supported with recent versions of aws-adfs. What version of aws-adfs is installed on your system?
After installing the pre-requisites and installing adfs-aws via pip3 using the
--user
option on a RHEL7 box I receive the following error when attempting to run the aws-adfs command (this error happens regardless of the--adfs-host
parameter.Command that produces error
It does not matter which cmdline arguments are specified, this error is persistent against my configuration. And using either a fake or real hostname yields the same error.
Workaround
A bit of googling revealed some clues that this error originates in the use of
hashlib.md5
in the context it is being used in thehtml_roles_fetcher.py
file.By modifying the
/home/{redacted}/.local/lib/python3.6/site-packages/aws_adfs/html_roles_fetcher.py
file, changing line 59 by replacinghashlib.md5
withhashlib.sha256
, ex:Resultant diff:
This modification resolves the error and I am able to run the program as expected.
Is there any objection to making this change to the source repo? If not, I will submit a pull request with this change.