Skip to content
Snippets Groups Projects
Commit 4e212184 authored by Sandro Knauß's avatar Sandro Knauß
Browse files

Replace reModifyFile regexp with a more readable solution. (#16326)

reModifyFile should make sure, that we only commit po files and non
hidden files and that the language extension is accepted. The current
reModifyFile was not correct, as it does not check against hidden files,
as it doesn't took into account, that we check against a complete path and
not just the name of the file.
This regex successfully passed the security check, without an issue raised.
I replaced these checks now with different tests (endswith and check for the
first letter in the name). Those checks should be more readable and more
verbose, what we are trying to do. Additionally those new checks should take
less memory and CPU to pass. The any function stops executing the iterator,
if it founds one matching element.
parent 90145f99
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment