WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311436
Directory path is incorrect in http/tests/security/file-system-access-via-dataTransfer.html
https://bugs.webkit.org/show_bug.cgi?id=311436
Summary
Directory path is incorrect in http/tests/security/file-system-access-via-dat...
Anthony Tarbinian
Reported
2026-04-03 13:08:58 PDT
In http/tests/security/file-system-access-via-dataTransfer.html , the targetDirectory variable doesn't have the path of a valid directory. This is what the code looks like: ``` let path = location.pathname.split("/"); let filename = path[path.length - 1]; let targetFileName = internals.createTemporaryFile(`${filename}`, ""); let targetDirectory = targetFileName.substring(0, targetFileName.length - filename); ``` Note that targetDirectory is created by taking the substring of targetFileName, however the end of the substring is calculated by doing `targetFileName.length - filename` where filename is a string, not a number. This should be `filename.length` instead. However even when making that change, the targetDirectory still isn't quite right. See the following logs: ``` path: ["","security","file-system-access-via-dataTransfer.html"] filename: file-system-access-via-dataTransfer.html targetFileName: /var/folders/gt/fcd9q4nn66bbk9l0jq5bj6sw0000gn/T/WebKitTestRunners-w8rnouln/WebCoreTesting-file-system-access-via-dataTransfer.htmlnc3lIz targetDirectory: /var/folders/gt/fcd9q4nn66bbk9l0jq5bj6sw0000gn/T/WebKitTestRunners-w8rnouln/WebCoreTesting-file-s ``` Note how targetDirectory has some trailing characters of "WebCoreTesting-file-s" after the directory path. It seems like `internals.createTemporaryFile` is padding some extra characters onto the original filename.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-04-03 13:09:04 PDT
<
rdar://problem/174033719
>
Anthony Tarbinian
Comment 2
2026-04-03 13:23:22 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/61992
EWS
Comment 3
2026-04-03 18:25:56 PDT
Committed
310549@main
(6e308cecbfca): <
https://commits.webkit.org/310549@main
> Reviewed commits have been landed. Closing PR #61992 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug