Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1257 and unicode error in Contrast importer #1260

Merged
merged 1 commit into from Jun 14, 2019

Conversation

@dr3dd589
Copy link
Member

dr3dd589 commented Jun 14, 2019

fix #1257

**Note: DefectDojo is now on Python3 and Django 2.2. Please submit your pull requests to the 'python3_dev' branch as the 'dev' branch is only for bug fixes. Any PR's submitted to the 'dev' branch should also be converted to Python3 and submited to the 'python3_dev' branch.

When submitting a pull request, please make sure you have completed the following checklist:

  • Your code is flake8 compliant
  • If this is a new feature and not a bug fix, you've included the proper documentation in the ReadTheDocs documentation folder. https://github.com/DefectDojo/Documentation/tree/master/docs or provide feature documentation in the PR.
  • Model changes must include the necessary migrations in the dojo/dd_migrations folder.
  • Add applicable tests to the unit tests.
@adracea

This comment has been minimized.

Copy link
Contributor

adracea commented Jun 14, 2019

I'm not quite sure if this actually would still replicate on python3 ? Otherwise it looks good

@dr3dd589

This comment has been minimized.

Copy link
Member Author

dr3dd589 commented Jun 14, 2019

hello, @adracea I have tested it on python3 with a contrast scan sample file from the sample repo. and it's working fine.

Copy link
Contributor

adracea left a comment

Great job @dr3dd589 :)
I guess this fix can go into the python 2 branch ?
@aaronweaver

@@ -30,7 +30,7 @@ def __init__(self, filename, test):
impact = "N/A"
references = "N/A"

dupe_key = hashlib.md5(category + '|' + str(cwe) + '|' + title + '|').hexdigest()
dupe_key = hashlib.md5(category.encode('utf-8') + str(cwe).encode('utf-8') + title.encode('utf-8')).hexdigest()

This comment has been minimized.

Copy link
@adracea

adracea Jun 14, 2019

Contributor

Quite sure this won't be needed in python 3 anymore ?
@Maffooch can you confirm ?
If so , I think we can try to sneak this into the python 2 branch ?

This comment has been minimized.

Copy link
@aaronweaver

aaronweaver Jun 14, 2019

Collaborator

Yes, we are still pushing patches to 2 as well.

This comment has been minimized.

Copy link
@Maffooch

Maffooch Jun 14, 2019

Collaborator

@adracea These changes are very much needed in python3 branch. There was some sneaky unicode changes in python3. The additions to fixtures and forms can definitely be put in python2 branch though.

@Maffooch Maffooch merged commit d9e3693 into DefectDojo:python3_dev Jun 14, 2019
4 checks passed
4 checks passed
AccessLint Review complete
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk - components/package.json (aaronweaver (GitHub marketplace)) No manifest changes detected
security/snyk - requirements.txt (aaronweaver (GitHub marketplace)) No manifest changes detected
@dr3dd589 dr3dd589 deleted the dr3dd589:whitesource_importer branch Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.