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

feat: Authenticate private resource requests #21331

Draft
wants to merge 12 commits into
base: trunk
Choose a base branch
from

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Oct 23, 2024

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

  1. Potential unintended areas of impact
    Gutenberg Mobile or Aztec editors fail.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manually tested both editors.
  3. What automated tests I added (or what prevented me from doing so)
    None, feels unnecessary for this currently experimental editor feature.

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

Unauthenticated requests failed when attempting to load resources from a
private site, e.g., an image.
@dcalhoun dcalhoun added [Type] Bug Gutenberg Editing and display of Gutenberg blocks. labels Oct 23, 2024
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 23, 2024

Project dependencies changes

The following changes in project dependencies were detected (configuration wordpressVanillaReleaseRuntimeClasspath):

list
New Dependencies
com.squareup.okhttp3:okhttp-bom:4.12.0

Upgraded Dependencies
com.squareup.okhttp3:logging-interceptor:4.12.0, (changed from 4.9.2)
com.squareup.okhttp3:okhttp-urlconnection:4.12.0, (changed from 4.9.2)
org.wordpress.gutenbergkit:android:34-946b8c24e4e55e42304fa0821d27307915ef9cb8, (changed from trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33)
tree
 +--- project :libs:editor
 |    +--- com.facebook.react:react-android:0.73.3
-|    |    \--- com.squareup.okhttp3:okhttp-urlconnection:4.9.2
-|    |         +--- com.squareup.okhttp3:okhttp:4.9.2 -> 4.12.0 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
+|    |    \--- com.squareup.okhttp3:okhttp-urlconnection:4.9.2 -> 4.12.0
+|    |         +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
-|    \--- org.wordpress.gutenbergkit:android:trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33
-|         +--- androidx.core:core-ktx:1.13.1 (*)
-|         +--- androidx.appcompat:appcompat:1.7.0 (*)
-|         +--- com.google.android.material:material:1.12.0 (*)
-|         +--- androidx.webkit:webkit:1.11.0 -> 1.12.1 (*)
-|         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0 -> 1.9.10 (*)
+|    \--- org.wordpress.gutenbergkit:android:34-946b8c24e4e55e42304fa0821d27307915ef9cb8
+|         +--- androidx.core:core-ktx:1.13.1 (*)
+|         +--- androidx.appcompat:appcompat:1.7.0 (*)
+|         +--- com.google.android.material:material:1.12.0 (*)
+|         +--- androidx.webkit:webkit:1.11.0 -> 1.12.1 (*)
+|         +--- com.squareup.okhttp3:okhttp-bom:4.12.0
+|         |    +--- com.squareup.okhttp3:okhttp:4.12.0 (c)
+|         |    +--- com.squareup.okhttp3:okhttp-urlconnection:4.12.0 (c)
+|         |    \--- com.squareup.okhttp3:logging-interceptor:4.12.0 (c)
+|         +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0 -> 1.9.10 (*)
 +--- project :libs:fluxc
-|    \--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2 (*)
+|    \--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.12.0 (*)
-+--- org.wordpress.gutenbergkit:android:trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33 (*)
++--- org.wordpress.gutenbergkit:android:34-946b8c24e4e55e42304fa0821d27307915ef9cb8 (*)
 \--- com.zendesk:support:5.1.2
      \--- com.zendesk:support-providers:5.1.2
           \--- com.zendesk:core:4.0.9
-               \--- com.squareup.okhttp3:logging-interceptor:4.9.2
-                    +--- com.squareup.okhttp3:okhttp:4.9.2 -> 4.12.0 (*)
-                    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
+               \--- com.squareup.okhttp3:logging-interceptor:4.9.2 -> 4.12.0
+                    +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
+                    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 23, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21331-7f12e5a
Commit7f12e5a
Direct Downloadwordpress-prototype-build-pr21331-7f12e5a.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 23, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21331-7f12e5a
Commit7f12e5a
Direct Downloadjetpack-prototype-build-pr21331-7f12e5a.apk
Note: Google Login is not supported on these builds.

This was added to mirror the `shouldInterceptRequest` method signature,
but is unnecessary complexity.
Copy link

sonarcloud bot commented Oct 24, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks. [Type] Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants