Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Encode fileServerFolder to fix #25839 #29162

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
787e65b
fix: Encode fileServerFolder to fix #25839
Zzet-Z Mar 17, 2024
8294ce1
fix: Encode fileServerFolder to fix #25839 add changelog
Zzet-Z Mar 17, 2024
4fd6c91
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Mar 18, 2024
0fc45d8
Merge branch 'zzt/fix/fix25839' of github.com:Zzet-Z/cypress into zzt…
Zzet-Z Mar 19, 2024
a998097
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Mar 20, 2024
b5dab4e
Merge branch 'zzt/fix/fix25839' of github.com:Zzet-Z/cypress into zzt…
Zzet-Z Mar 20, 2024
a581fee
update unit tests
Zzet-Z Mar 20, 2024
8f1adbb
Merge branch 'develop' into zzt/fix/fix25839
jennifer-shehane Mar 28, 2024
49e11fb
adjust CHANGELOG location
Zzet-Z Mar 29, 2024
8cfea02
Merge branch 'develop' into zzt/fix/fix25839
jennifer-shehane Mar 29, 2024
62aa5c1
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Mar 30, 2024
7d330d6
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 2, 2024
0dde995
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 4, 2024
20ad604
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 11, 2024
302a0ae
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 12, 2024
a0e9e43
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 17, 2024
3478cd1
Update packages/server/test/unit/config_spec.js
jennifer-shehane Apr 17, 2024
fe76f6e
Fix changelog entry placement
jennifer-shehane Apr 17, 2024
7435ec6
Merge branch 'cypress-io:develop' into zzt/fix/fix25839
Zzet-Z Apr 18, 2024
65e14b4
Merge branch 'develop' into zzt/fix/fix25839
jennifer-shehane Apr 19, 2024
c6585e7
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 24, 2024
1558179
Fix some bugs to pass the test case
Zzet-Z Apr 24, 2024
ff9b1d3
maintain a test case
Zzet-Z Apr 25, 2024
cee9827
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z Apr 25, 2024
f0c7b28
Fix changelog entry
jennifer-shehane Apr 25, 2024
98c69d8
Merge branch 'develop' into zzt/fix/fix25839
mschile May 13, 2024
e569a7d
added integration test and updated to use encodeURI
mschile May 16, 2024
81d95bf
Update cli/CHANGELOG.md
mschile May 16, 2024
1bffdcb
Merge branch 'develop' into zzt/fix/fix25839
Zzet-Z May 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Expand Up @@ -33,6 +33,7 @@ _Released 4/2/2024_

- Fixed an issue where Cypress was not executing beyond the first spec in `cypress run` for versions of Firefox 124 and up when a custom user agent was provided. Fixes [#29190](https://github.com/cypress-io/cypress/issues/29190).
- Fixed a bug where fields using arrays in `cypress.config` are not correctly processed. Fixes [#27103](https://github.com/cypress-io/cypress/issues/27103). Fixed in [#27312](https://github.com/cypress-io/cypress/pull/27312).
- Fixed an issue when there are special characters in a test folder path where the folder path is sometimes not parsed correctly. Fixes [#25839](https://github.com/cypress-io/cypress/issues/25839).
- Fixed a hang where Cypress would run indefinitely while recording to the cloud when CDP disconnects during the middle of a test. Fixes [#29209](https://github.com/cypress-io/cypress/issues/29209).
- Fixed a bug where option values containing quotation marks could not be selected. Fixes [#29213](https://github.com/cypress-io/cypress/issues/29213)

Expand Down
2 changes: 1 addition & 1 deletion packages/driver/src/cypress/error_messages.ts
Expand Up @@ -2343,7 +2343,7 @@ export default {

We failed looking for this file at the path:

${obj.path}
${decodeURIComponent(obj.path)}

The internal Cypress web server responded with:

Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/file_server.js
Expand Up @@ -54,7 +54,7 @@ module.exports = {
const token = random.id(64)

const srv = http.createServer(httpUtils.lenientOptions, (req, res) => {
return onRequest(req, res, token, fileServerFolder)
return onRequest(req, res, token, encodeURIComponent(fileServerFolder))
})

allowDestroy(srv)
Expand Down
6 changes: 6 additions & 0 deletions packages/server/test/unit/config_spec.js
Expand Up @@ -368,6 +368,12 @@ describe('lib/config', () => {
return this.expectValidationFails('the value was: true')
})
})

it('passes if a string contain invalid character but encode it', function () {
Zzet-Z marked this conversation as resolved.
Show resolved Hide resolved
this.setup({ fileServerFolder: encodeURIComponent('/specialCharacters/无法解析的特殊字符') })

return this.expectValidationPasses()
})
})

context('fixturesFolder', () => {
Expand Down