Fixed
Status Update
Comments
il...@google.com <il...@google.com>
b....@gmail.com <b....@gmail.com> #2
Shouldn't query parameter names be case sensitive? Is the bug here just point 1?
ul...@gmail.com <ul...@gmail.com> #3
You are right, query parameter names should be case sensitive. So it is only a problem with the domain name
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit d6e644330fecda4c4cf70655ded76847372864a7
Author: Ben Trengrove <bentrengrove@users.noreply.github.com>
Date: Mon Mar 29 13:46:52 2021
[GH] [Navigation] Fix deeplink domain parsing being case sensitive
## Proposed Changes
The current regex pattern matcher was doing a case sensitive check of the domain and arguments. Simply changing it to case insensitive seems to be all that's required to fix this bug. It is important that parameters are still case sensitive but this is still the case as parameter matching is done by the `Uri` code not the `NavDeepLink` code. I have written tests to cover these cases.
If it is deemed too risky to just run the pattern matcher with `CASE_INSENSITIVE` I believe the regex will have to be redesigned not to use `\Q\E`.
## Testing
- Tested using the sample project and deep linking via `adb shell am start -a android.intent.action.VIEW -dhttps://www.Iana.org/domains/second`
- Added new unit tests to the project for the different case insensitive and sensitive sections
Test: /gradlew test connectedCheck
## Issues Fixed
https://issuetracker.google.com/issues/153829033
Fixes: b/153829033
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/144 .
Resolves #144
Github-Pr-Head-Sha: 868bcf3346af6eb46da7e5988977574be8843eba
GitOrigin-RevId: 0c507315877618e865f6a79ce4e01ca594da28a9
Change-Id: Ic03b432ffc9f8a71fccad3f01c13232561366d46
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDeepLinkTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDeepLink.kt
https://android-review.googlesource.com/1656236
Branch: androidx-main
commit d6e644330fecda4c4cf70655ded76847372864a7
Author: Ben Trengrove <bentrengrove@users.noreply.github.com>
Date: Mon Mar 29 13:46:52 2021
[GH] [Navigation] Fix deeplink domain parsing being case sensitive
## Proposed Changes
The current regex pattern matcher was doing a case sensitive check of the domain and arguments. Simply changing it to case insensitive seems to be all that's required to fix this bug. It is important that parameters are still case sensitive but this is still the case as parameter matching is done by the `Uri` code not the `NavDeepLink` code. I have written tests to cover these cases.
If it is deemed too risky to just run the pattern matcher with `CASE_INSENSITIVE` I believe the regex will have to be redesigned not to use `\Q\E`.
## Testing
- Tested using the sample project and deep linking via `adb shell am start -a android.intent.action.VIEW -d
- Added new unit tests to the project for the different case insensitive and sensitive sections
Test: /gradlew test connectedCheck
## Issues Fixed
Fixes:
This is an imported pull request from
Resolves #144
Github-Pr-Head-Sha: 868bcf3346af6eb46da7e5988977574be8843eba
GitOrigin-RevId: 0c507315877618e865f6a79ce4e01ca594da28a9
Change-Id: Ic03b432ffc9f8a71fccad3f01c13232561366d46
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDeepLinkTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDeepLink.kt
Description
So if I define a deeplink in my navigation graph like the following
```
<argument
android:name="myQueryParam"
app:argType="string"
android:defaultValue="@null"
app:nullable="true" />
<deepLink app:uri="
```
1. when I click the link `
2. when I click the link `
Component used: Navigation\
Version used: 2.3.0-alpha04\
Devices/Android versions reproduced on: Not device related