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

Deletion thumbnail sorl #120

Merged
merged 9 commits into from
May 17, 2022
Merged

Deletion thumbnail sorl #120

merged 9 commits into from
May 17, 2022

Conversation

LePetitTim
Copy link
Contributor

No description provided.

@LePetitTim LePetitTim changed the title Deleteion thumbnail sorl Deletion thumbnail sorl May 17, 2022
@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #120 (88271ce) into master (43db029) will increase coverage by 0.50%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #120      +/-   ##
==========================================
+ Coverage   99.13%   99.63%   +0.50%     
==========================================
  Files          18       18              
  Lines        1385     1382       -3     
==========================================
+ Hits         1373     1377       +4     
+ Misses         12        5       -7     
Impacted Files Coverage Δ
terra_geocrud/models.py 100.00% <100.00%> (ø)
terra_geocrud/properties/files.py 100.00% <100.00%> (ø)
terra_geocrud/serializers.py 100.00% <0.00%> (+2.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43db029...88271ce. Read the comment docs.

@LePetitTim LePetitTim requested a review from submarcos May 17, 2022 13:24
@@ -40,11 +41,17 @@ def get_thumbnail(self, file_, geometry_string, **options):
if value != getattr(default_settings, attr):
options.setdefault(key, value)

try:
source_image = default.engine.get_image(source)
options['hash'] = hashlib.md5(source_image.tobytes()).hexdigest()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of insecure MD2, MD4, MD5, or SHA1 hash function.

@LePetitTim LePetitTim requested a review from submarcos May 17, 2022 14:52
# patch file_infos with new path
detail_infos = file_info.split(';name=')
new_info = f"{detail_infos[0]};name={storage_file_path}"
new_info = f"{detail_infos[0]};name={stored_name}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it's not only name but path in storage I prefer to keep storage_file_path

@codeclimate
Copy link

codeclimate bot commented May 17, 2022

Code Climate has analyzed commit 88271ce and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Security 1

View more on Code Climate.

@LePetitTim LePetitTim merged commit bea4728 into master May 17, 2022
@LePetitTim LePetitTim deleted the deleteion_thumbnail_sorl branch May 17, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants