When a user clicks 'Preview SQL' on a report, they have a 'Duplicate' button This sends a URL with phase: phase=Create%20report%20from%20existing The permissions check looks for: 'Build new from existing' when the phase isn't found we only require: reports: '*' (any report permission) The Duplicate button leads to a form where the phase is "Save Report" which, again, is not in the permissions checks at the start and so defaults to reports:* Fix by bug 34478 in 24.05+
Yeah the reports permissions are a bit of a mess :(
Created attachment 170891 [details] [review] Bug 37737: [23.11] Fixed report permissions to prevent not allowed duplication Made the run report permission explicit
else { - $flagsrequired = '*'; } Is this on purpose ? Empty else o_O
(In reply to Fridolin Somers from comment #3) > else { > - $flagsrequired = '*'; > } > > Is this on purpose ? > Empty else o_O No, no it was not. I'll fix it and do a new patch.
Created attachment 171232 [details] [review] Bug 37737: [23.11] Fixed report permissions to prevent disallowed duplication Test plan: 1. Checkout 23.11 2. Create a report 3. Create a user with staff login and run reports permissions 4. Log in as your new user 5. Preview the SQL of the report 6. In the preview modal, select Duplicate report 7. Apply patch 8. Repeat steps 4-6. 9. You should be prompted to login.
Created attachment 171418 [details] [review] Bug 37737: [23.11] Fixed report permissions to prevent disallowed duplication Test plan: 1. Checkout 23.11 2. Create a report 3. Create a user with staff login and run reports permissions 4. Log in as your new user 5. Preview the SQL of the report 6. In the preview modal, select Duplicate report 7. Apply patch 8. Repeat steps 4-6. 9. You should be prompted to login. Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Created attachment 171619 [details] [review] Bug 37737: [23.11] Fixed report permissions to prevent disallowed duplication Test plan: 1. Checkout 23.11 2. Create a report 3. Create a user with staff login and run reports permissions 4. Log in as your new user 5. Preview the SQL of the report 6. In the preview modal, select Duplicate report 7. Apply patch 8. Repeat steps 4-6. 9. You should be prompted to login. Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Sorry i missed this one for 23.11.09, will be in 23.11.10
Applied to 23.05.x-security for 23.05.16
Verified that the Version(s) released in: 22.11.22 was true.