-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: investigate file authenticity #7331
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7331 +/- ##
==========================================
- Coverage 88.98% 88.87% -0.12%
==========================================
Files 291 291
Lines 40717 41071 +354
==========================================
+ Hits 36233 36500 +267
- Misses 4484 4571 +87 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor comments to take or leave
ietf/doc/forms.py
Outdated
# looking for files with less than 8 characters in the name is not useful | ||
# Requiring this will help protect against the secretariat unintentionally | ||
# matching every draft. | ||
if len(name_fragment) < 8: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you put min_length=8
on the CharField
, it'll validate for you and (I think) catch it client-side with HTML validation
ietf/doc/forms.py
Outdated
# matching every draft. | ||
if len(name_fragment) < 8: | ||
raise ValidationError("Please enter at least 8 characters") | ||
if any([c in name_fragment for c in disallowed_characters]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely trivial gains here, but if you leave out the []
inside the any()
, then this will use generators instead of a list. That'll let the any()
short-circuit if it hits a True
value.
settings.INTERNET_DRAFT_ARCHIVE_DIR = str(new_archive_dir) | ||
donated_personal_copy_dir = archive_tmp_dir / "donated-personal-copy" | ||
donated_personal_copy_dir.mkdir() | ||
meeting_dir = Path(settings.AGENDA_PATH) / "666" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😈
No description provided.