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

Reapply Fix escaping in the URL conversion #36949

Closed
wants to merge 1 commit into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
This change is a second attempt at fixing URL encoding and escaping that was already tried here.

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some % characters.

This change should also fix #28508 for good.

Changelog:

[iOS][Fixed] - Properly escape URLs

Differential Revision: D45078923

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Apr 18, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

@analysis-bot
Copy link

analysis-bot commented Apr 18, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,624,897 +0
android hermes armeabi-v7a 7,937,532 +0
android hermes x86 9,111,778 +0
android hermes x86_64 8,966,631 +0
android jsc arm64-v8a 9,188,944 +0
android jsc armeabi-v7a 8,379,041 +0
android jsc x86 9,247,173 +0
android jsc x86_64 9,505,674 +0

Base commit: 0e5d54a
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Apr 23, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: b7154302260304291b09be5d5e7a0d43e0514ed3
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Apr 23, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 0f29e94523c35e97c86daf7d710c599363d56352
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Apr 24, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 94e882e797db879c4f1be24d163817aa60ef3776
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Apr 24, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: a09e434ac1365949f1a738c9c17111a92d55677b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Apr 25, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 6daac460dd4424131341d18c400a39ce2b605436
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Apr 25, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 3e6cbd0c0532e85c31fb0b7aa3ab3cef1c5c6f6c
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 2796d175ac21befc49afd1b940d5c2a0c93ed00b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45078923

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 5e983d5.

jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 010a5c173784f8341a1a08bcbd06a6ad14299c75
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Pull Request resolved: facebook#36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](facebook@2b4e1f5).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix facebook#28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 010a5c173784f8341a1a08bcbd06a6ad14299c75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS Linking escapes hash's
3 participants