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

frontend: avoid a duplicated "exists" check #3472

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

praiskup
Copy link
Member

The commit 609d369 only partly resolved the TOCTOU effects (which we are not fixing here either). The problem being fixed now is that we duplicated the duplication check,

  • once in the validate_on_submit(), then
  • using the add(check_for_duplicates=True). The later check is wrong though, because it raises an exception that is not handled properly (exist_ok=True ignored).

Complements: fdff0c8
Complements: 609d369
Fixes: #3471

The commit 609d369 only partly resolved
the TOCTOU effects (which we are not fixing here either).  The problem
being fixed now is that we duplicated the duplication check,
- once in the `validate_on_submit()`, then
- using the `add(check_for_duplicates=True)`.
The later check is wrong though, because it raises an exception that is
not handled properly (exist_ok=True ignored).

Complements: fdff0c8
Complements: 609d369
Fixes: fedora-copr#3471
@praiskup
Copy link
Member Author

@FrostyX do you think I can hot-fix this in prod?

@praiskup
Copy link
Member Author

I mean, this frontend's code deserves a major cleanup IMVHO - namely I think this commit brings in some dead code. But the commit here seems relatively simple so we could do more things in a separate PR.

@praiskup praiskup merged commit 3e65d42 into fedora-copr:main Oct 11, 2024
7 checks passed
@FrostyX
Copy link
Member

FrostyX commented Oct 11, 2024

@FrostyX do you think I can hot-fix this in prod?

We discussed it off-list but just FTR, I ACKed this

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.

Packit 400 errors
2 participants