-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CMM-992 reader deeplinks #22374
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
Open
adalpari
wants to merge
10
commits into
release/26.4
Choose a base branch
from
fix/CMM-992-reader-deeplinks
base: release/26.4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+642
−40
Open
CMM-992 reader deeplinks #22374
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
205bc6e
Supporting read and discovery deeplinks
adalpari ba8e9dd
Fixing discovery issue
adalpari a13caf8
Handling feed links
adalpari f1aa2b4
Handling search and tags
adalpari 4b98e77
Some improvements
adalpari 53e19b9
Re-adding deleted code
adalpari 5bbf6a7
Lint fixes
adalpari 43c3cef
Adding tests for ReaderActivityLauncher
adalpari 2625667
Update WordPress/src/main/java/org/wordpress/android/ui/ActivityLaunc…
adalpari 9eb3e36
chore: trigger CI
adalpari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -581,6 +581,82 @@ | |
| android:pathPattern="/site-monitoring/.*" | ||
| android:scheme="http" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/read" | ||
| android:scheme="https" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/read" | ||
| android:scheme="http" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/discover" | ||
| android:scheme="https" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/discover" | ||
| android:scheme="http" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/read/feeds/.*" | ||
| android:scheme="https" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/read/feeds/.*" | ||
| android:scheme="http" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/reader/feeds/.*" | ||
| android:scheme="https" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/reader/feeds/.*" | ||
| android:scheme="http" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/read/search" | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/read/search" | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/reader/search" | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:path="/reader/search" | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/tag/.*" | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" /> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/tag/.*" | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" /> | ||
|
|
||
| </intent-filter> | ||
| </activity-alias> | ||
|
|
||
|
|
@@ -612,49 +688,71 @@ | |
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/read/feeds/.*/posts/.*" | ||
| android:scheme="https" > | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving the ignore suppression here instead of having a huuuge lint/baseline file |
||
| </data> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/read/feeds/.*/posts/.*" | ||
| android:scheme="http" > | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/read/blogs/.*/posts/.*" | ||
| android:scheme="https" > | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/read/blogs/.*/posts/.*" | ||
| android:scheme="http" > | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="*.wordpress.com" | ||
| android:pathPattern="/2.../../../.*" | ||
| android:scheme="https" > | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="*.wordpress.com" | ||
| android:pathPattern="/2.../../../.*" | ||
| android:scheme="http" > | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="*.wordpress.com" | ||
| android:pathPattern="/19../../../.*" | ||
| android:scheme="https" > | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="*.wordpress.com" | ||
| android:pathPattern="/19../../../.*" | ||
| android:scheme="http" > | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/reader/feeds/.*/posts/.*" | ||
| android:scheme="https" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <data | ||
| android:host="wordpress.com" | ||
| android:pathPattern="/reader/feeds/.*/posts/.*" | ||
| android:scheme="http" | ||
| tools:ignore="IntentFilterUniqueDataAttributes" > | ||
| </data> | ||
|
|
||
| <action android:name="org.wordpress.android.action.VIEW_POST" /> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security: Overly broad pathPattern: The pattern
/read/feeds/.*will match ANY path starting with/read/feeds/, including potentially malicious paths like/read/feeds/../../../etc/passwd. While Android's intent filtering doesn't typically allow path traversal attacks, consider using more specific patterns.The security scanner flagged these data tags as having non-unique attributes. While this is a warning, it might be cleaner to be more explicit with your intent filters. However, this is likely acceptable for your use case.