Skip to content

Commit

Permalink
fix: creating/viewing an album in photos app (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
EsadCetiner authored Dec 18, 2024
1 parent ab8d9d4 commit 969b3b5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/nextcloud-rule-exclusions-before.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ SecRule REQUEST_FILENAME "@rx /apps/photos/api/v[0-9]+/preview/[0-9]+$" \
# Photos: Albums, Shared Albums, Places
# Allow the data type 'text/plain'
# Since the content is actually XML, we switch on the XML parser
SecRule REQUEST_FILENAME "@rx /remote\.php/dav/photos/[^/]+/(?:albums|sharedalbums|places)(?:/[^/]+)?/$" \
SecRule REQUEST_FILENAME "@rx /remote\.php/dav/photos/[^/]+/(?:albums|sharedalbums|places)(?:/[^/]+)?/?$" \
"id:9508952,\
phase:1,\
pass,\
Expand Down
37 changes: 37 additions & 0 deletions tests/regression/nextcloud-rule-exclusions-plugin/9508952.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
meta:
author: "Esad Cetiner"
description: "Nextcloud Photos"
enabled: true
name: 9508952.yaml
tests:
- test_title: 9508952-1
desc: Creating/viewing a photo album
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: OWASP CRS test agent
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: text/plain;charset=UTF-8
port: 80
method: PROPFIND
uri: /remote.php/dav/photos/esadc/albums/test
data: |
<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:"
xmlns:oc="http://owncloud.org/ns"
xmlns:nc="http://nextcloud.org/ns"
xmlns:ocs="http://open-collaboration-services.org/ns">
<d:prop>
<nc:last-photo />
<nc:nbItems />
<nc:location /><nc:dateRange /><nc:collaborators />
</d:prop>
</d:propfind>
version: HTTP/1.1
output:
no_log_contains: |-
id "920420"|id "921110"

0 comments on commit 969b3b5

Please sign in to comment.