Skip to content

fix: handle invalid fields properly in proc material upload form - #3784

Merged
jennifer-richards merged 5 commits into
ietf-tools:feat/bs5from
painless-security:jennifer/procmat-filetype-check
Apr 8, 2022
Merged

fix: handle invalid fields properly in proc material upload form#3784
jennifer-richards merged 5 commits into
ietf-tools:feat/bs5from
painless-security:jennifer/procmat-filetype-check

Conversation

@jennifer-richards

Copy link
Copy Markdown
Member

The validation in the UploadProceedingsMaterialForm incorrectly handled invalid or omitted fields or files during validation. This corrects that handling and adds tests.

This should prevent server errors when uploading files with incorrect file types / extensions. The form assumed cleaned_data['file'] would exist if a file was uploaded, but Django removes invalid data from cleaned_data.

@codecov

codecov Bot commented Apr 6, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3784 (1ad521b) into feat/bs5 (8bd4851) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 1ad521b differs from pull request most recent head 545056b. Consider uploading reports for the commit 545056b to get more accurate results

@@            Coverage Diff            @@
##           feat/bs5    #3784   +/-   ##
=========================================
  Coverage     87.97%   87.98%           
=========================================
  Files           296      297    +1     
  Lines         38795    38804    +9     
=========================================
+ Hits          34130    34141   +11     
+ Misses         4665     4663    -2     
Impacted Files Coverage Δ
ietf/meeting/views.py 90.73% <100.00%> (+0.02%) ⬆️
ietf/meeting/views_proceedings.py 91.92% <100.00%> (+1.24%) ⬆️
ietf/meeting/utils.py 90.27% <0.00%> (-0.29%) ⬇️
ietf/meeting/models.py 86.08% <0.00%> (ø)
ietf/meeting/templatetags/editor_tags.py 100.00% <0.00%> (ø)

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 eab4705...545056b. Read the comment docs.

@jennifer-richards
jennifer-richards merged commit 3619d3b into ietf-tools:feat/bs5 Apr 8, 2022
@jennifer-richards
jennifer-richards deleted the jennifer/procmat-filetype-check branch April 8, 2022 01:58
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants