Core Rule Set: a repository's name passes in the adopt form's id (closes #365)
check / check (push) Waiting to run
check / check (push) Waiting to run
While bodies are read, the forms that adopt or delete an unadopted repository were refused when the repository's name held a command, a system file's name or a shell path, such as alice/python3-app, alice/.profile or robin/assets. id there now skips 930120, 932120, 932160 and 932260. The paths are gitea's /-/admin/repos/unadopted, Forgejo's /admin/repos/unadopted, and /user/settings/repos/unadopted, which both serve. Model: opus-5-5
This commit is contained in:
1 parent
4b62bc84ce
commit
d5ff3ef763
4 files changed
+108
-12
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# gitea's fixes: some fields skip the rules that refused ordinary gitea requests.
|
||||
# They are the fields where gitea sends a search, a file name or a branch name.
|
||||
# Each exclusion runs with the request, before the rules it switches off, those
|
||||
# of phase 1 included, so this file is loaded before the Core Rule Set's rules.
|
||||
# Each comment names a request the rule refused.
|
||||
# They are the fields where gitea sends a search, a file name, a branch name or
|
||||
# a repository's name. Each exclusion runs with the request, before the rules it
|
||||
# switches off, those of phase 1 included, so this file is loaded before the
|
||||
# Core Rule Set's rules. Each comment names a request the rule refused.
|
||||
|
||||
# Every rule below is skipped unless Inspect has set tx.app_gitea. It sets it
|
||||
# while SWW_APPS is unset, or lists gitea or forgejo for the request's hostname.
|
||||
@@ -399,6 +399,25 @@ SecRule REQUEST_FILENAME \
|
||||
"id:900640,phase:1,pass,nolog,\
|
||||
ctl:ruleRemoveTargetById=920450;REQUEST_HEADERS_NAMES:Content-Range"
|
||||
|
||||
# The forms that adopt or delete an unadopted repository send its name in id.
|
||||
# The admin forms put its owner in front, as alice/python3-app. id skips these
|
||||
# rules there:
|
||||
# 930120: alice/.profile
|
||||
# 932120: alice/powershell-scripts
|
||||
# 932160: robin/assets, which holds bin/as
|
||||
# 932260: alice/python3-app
|
||||
# The forms post to these paths:
|
||||
# /-/admin/repos/unadopted: gitea's admin form
|
||||
# /admin/repos/unadopted: Forgejo's admin form
|
||||
# /user/settings/repos/unadopted: the form in a user's settings, on both
|
||||
SecRule REQUEST_FILENAME \
|
||||
"@rx ^/(?:(?:-/)?admin|user/settings)/repos/unadopted$" \
|
||||
"id:900645,phase:1,pass,nolog,\
|
||||
ctl:ruleRemoveTargetById=930120;ARGS:id,\
|
||||
ctl:ruleRemoveTargetById=932120;ARGS:id,\
|
||||
ctl:ruleRemoveTargetById=932160;ARGS:id,\
|
||||
ctl:ruleRemoveTargetById=932260;ARGS:id"
|
||||
|
||||
# The passwords skip each rule that random passwords set off:
|
||||
# password: signing in, signing up, linking an account, activating an account,
|
||||
# resetting or changing the password, deleting an account, and creating or
|
||||
|
||||
Reference in new issue
Block a user