Skip to content
Snippets Groups Projects

fix: Pass HTTP Auth credentials along with JS "fetch" calls

Merged stephen requested to merge use-http-auth-creds-with-fetch into main
All threads resolved!

As per #140 (closed), the default behavior of the Javascript internal method "fetch" does not currently properly pass along HTTP-Auth credentials added by the user. This MR seeks to address this issue by updating our "fetch" calls in this manner, such that they will work on password-protected environments like staging and our review-apps.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @stephen

    • Resolved by anarcat

      i'm not sure exactly which part of !159 (comment 3084115) this is supposed to fix, but on https://use-http-auth-creds-with-fetch.donate-review.torproject.net/ i'm still getting "verification failed, try again later" and when i click on the "I'm not a robot" button, i still get the error:

      Uncaught (in promise) TypeError: statesColl is null
          filterStates https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/modules/locations.min.js:1
          init https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/script.min.js:1
          jQuery 5
      3 locations.min.js:1:1277
      ALTCHA TypeError: Window.fetch: /challenge/ is an url with embedded credentials.
          jt https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          K https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          Tt https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
      altcha.iife.js:1:18703
          R https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          K https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          (Async: promise callback)
          K https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          Tt https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
      ALTCHA TypeError: Window.fetch: /challenge/ is an url with embedded credentials.
          jt https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          K https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
          Tt https://tor-www@use-http-auth-creds-with-fetch.donate-review.torproject.net/static/js/altcha.iife.js:1
      altcha.iife.js:1:18703
  • stephen requested review from @anarcat

    requested review from @anarcat

  • anarcat resolved all threads

    resolved all threads

  • anarcat approved this merge request

    approved this merge request

  • stephen mentioned in commit 569eb940

    mentioned in commit 569eb940

  • merged

  • stephen mentioned in issue #140 (closed)

    mentioned in issue #140 (closed)

Please register or sign in to reply
Loading