]> Untitled Git - lemmy.git/commit
Fixes #2900 - Checks slur regex to see if it is too permissive (#3146)
authorNina Blanson <nina.m.blanson@gmail.com>
Tue, 27 Jun 2023 11:03:30 +0000 (06:03 -0500)
committerGitHub <noreply@github.com>
Tue, 27 Jun 2023 11:03:30 +0000 (07:03 -0400)
commite63aa80c3a3631f4713525d65c8223e1106355e8
tree1d0a95f7bea6d7e3c261dcfe5ee425826eaa0691
parentd1d90af0eb749ad79bc46ee81717e7166936ea89
Fixes #2900 - Checks slur regex to see if it is too permissive (#3146)

* Fixes #2900 - Checks slur regex to see if it is too permissive along with small validation organization

* Clean up variable names, add handler for valid empty string usecase

* Update tests

* Create validation function and add tests

* Test clean up

* Use payload value vs local site value to prevent stunlocking

* Remove println added while testing

* Fall back to local site regex if not provided from request

* Attempt clean up of flaky comment_view tests

* Pull in latest submodule

* Move application, post check into functions, add more tests and improve test readability

---------

Co-authored-by: Nutomic <me@nutomic.com>
crates/api_common/src/utils.rs
crates/api_crud/src/site/create.rs
crates/api_crud/src/site/mod.rs
crates/api_crud/src/site/update.rs
crates/utils/src/utils/validation.rs