-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Authenticate private resource requests #21331
base: trunk
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger |
Project dependencies changesThe following changes in project dependencies were detected (configuration list
tree +--- project :libs:editor
-| \--- org.wordpress.gutenbergkit:android:trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33
+| \--- org.wordpress.gutenbergkit:android:trunk-d6fbfc7bc28ae6db2cce09950f24bc3080374596
-\--- org.wordpress.gutenbergkit:android:trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33 (*)
+\--- org.wordpress.gutenbergkit:android:trunk-d6fbfc7bc28ae6db2cce09950f24bc3080374596 (*) |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21331-fc246b1 | |
Commit | fc246b1 | |
Direct Download | wordpress-prototype-build-pr21331-fc246b1.apk |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21331-fc246b1 | |
Commit | fc246b1 | |
Direct Download | jetpack-prototype-build-pr21331-fc246b1.apk |
libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergEditorFragment.java
Fixed
Show fixed
Hide fixed
|
||
String proxyUrl = url.toString(); | ||
if (mIsPrivateAtomic) { | ||
proxyUrl = getPrivateResourceProxyUrl(url); |
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.
Private Atomic sites require a proxy for request authentication (D38925-code).
libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergEditorFragment.java
Outdated
Show resolved
Hide resolved
libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergEditorFragment.java
Fixed
Show fixed
Hide fixed
Address lint error regarding a common source of bugs. #21331 (review)
|
👋🏻 @jkmassel. I updated this with the merged wordpress-mobile/GutenbergKit#30 and the latest from |
Ideally, it is merged. However, @jkmassel mentioned privately he would prefer avoiding a proxy URL. Transparently, I was unsure as to how we might accomplish that, so I have not moved this forward. @jkmassel do you have specific ideas for avoiding the proxy URL? |
Unauthenticated requests fail when attempting to load resources from a private site--e.g., an image.
Avoid NullPointerExceptions.
172e55e
to
fc246b1
Compare
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #21331 +/- ##
=======================================
Coverage 39.41% 39.41%
=======================================
Files 2122 2122
Lines 99570 99570
Branches 15324 15324
=======================================
Hits 39247 39247
Misses 56844 56844
Partials 3479 3479 ☔ View full report in Codecov by Sentry. |
Related
Description
Authenticate resource requests originating from within the WebView so that
requests to private sites succeed.
To Test:
See wordpress-mobile/GutenbergKit#34.
Regression Notes
Gutenberg Mobile or Aztec editors fail.
Manually tested both editors.
None, feels unnecessary for this currently experimental editor feature.
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):