Repository navigation
fix(password-protected-folders): [OCISDEV-1016] validate .psec URL before opening - #13924
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
fb9228c to
d73686b
Compare
DeepDiver1975
left a comment
There was a problem hiding this comment.
Solid security fix; one blocking defect (the changelog) that's already failing CI.
Validation is correct. Scheme allowlist (https:/http:) + URL.origin comparison is the right approach — origin covers scheme+host+port, and new URL() normalization means no whitespace/case bypass. Blocks javascript:/data:/blob: and wrong-origin URLs at the render-time iframe src gate in FolderViewModal.vue, which is the layer that actually matters. Defense-in-depth across write (useCreateFileHandler) / read (useOpenFolderAction) / render is good, and tests cover all three layers plus the malicious-scheme and wrong-origin cases.
Blocking — changelog URL is malformed (this is why Generate Changelog is red):
- calens fails with
bugfix-validate-psec-url.md: primary issue ID not found.https://github.com/owncloud/web/issues/OCISDEV-1016is a Jira ID, not a GitHub issue — that URL 404s and calens can't parse a primary ID from it. Perchangelog/TEMPLATE, with no GitHub issue the primary ID is the PR. Fix: replace it withhttps://github.com/owncloud/web/pull/13924(keep the Jira link in the PR body, not the fragment).
Minor (non-blocking):
FolderViewModal.vuethrows synchronously in<script setup>. TheuseOpenFolderActionread-time guard already rejects bad URLs before the modal mounts, so the component throw is unreachable belt-and-suspenders — fine as a backstop, but it would surface as an uncaught render error rather than graceful handling if ever reached.sandbox="allow-scripts allow-same-origin ...": theallow-scripts+allow-same-origincombination lets framed content remove its own sandbox. Acceptable here since origin is already validated to the configured server, but worth a code comment noting the intent is hardening, not isolation.
CI: Generate Changelog failing (changelog URL, above), build pending, rest green. mergeStateStatus: BLOCKED.
🤖 Generated with Claude Code
5701137 to
7ebea7a
Compare
7ebea7a to
955fae1
Compare
|
DeepDiver1975
left a comment
There was a problem hiding this comment.
Re-review (delta only): blocker cleared, LGTM.
- Changelog fixed — fragment now cites
https://github.com/owncloud/web/pull/13924(was the Jira IDOCISDEV-1016).Generate ChangelogCI is green. - Validation strengthened beyond the prior round: origin check (
url.origin === configStore.serverUrlorigin) added on top of the scheme check, and validation now happens early inuseOpenFolderAction/useCreateFileHandlerwith i18n'd errors —FolderViewModal's throw is now a backstop, not the sole guard. Good. - Tests cover scheme (
javascript:/data:/blob:) and cross-origin rejection across all three paths.
Security fix sound, blocker resolved. Not approving/merging — leaving the merge call to maintainers.
🤖 Generated with Claude Code



validate .psec URL before opening
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Open tasks: