criticalmass-one / criticalmass-in

Main application for criticalmass.in
https://criticalmass.in/
32 stars 8 forks source link

Login via Strava is broken #853

Open alexs77 opened 2 years ago

alexs77 commented 2 years ago

Pretty much like Issue #237 …

The Login via Strava button on https://criticalmass.in/login leading to https://criticalmass.in/connect/strava is broken. I'm redirected to the Strava page and logged in there and also authorized criticalmass to get data.

Then back on https://criticalmass.in/login/check-strava?state=&code=df00e00b879703674a9af21e0e7eb45dcd1d8271&scope= I get a 500.

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Response as shown in browser debug tools:

    <!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>An Error Occurred: Internal Server Error</title>
        <style>
            body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
            .container { margin: 30px; max-width: 600px; }
            h1 { color: #dc3545; font-size: 24px; }
            h2 { font-size: 18px; }
        </style>
    </head>
    <body>
        <div class="container">
            <h1>Oops! An Error Occurred</h1>
            <h2>The server returned a "500 Internal Server Error".</h2>

            <p>
                Something is broken. Please let us know what you were doing when this error occurred.
                We will fix it as soon as possible. Sorry for any inconvenience caused.
            </p>
        </div>
    </body>
</html>

Request:

curl 'https://criticalmass.in/login/check-strava?state=&code=e6f4a8cba8b2c75b9c6f68a9616538af4ef9137e&scope=' \
  -H 'authority: criticalmass.in' \
  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'accept-language: en-US;q=0.8' \
  -H 'cache-control: no-cache' \
  -H 'cookie: PHPSESSID=<nah…>; cookie_notice=1' \
  -H 'dnt: 1' \
  -H 'pragma: no-cache' \
  -H 'referer: https://criticalmass.in/' \
  -H 'sec-fetch-dest: document' \
  -H 'sec-fetch-mode: navigate' \
  -H 'sec-fetch-site: cross-site' \
  -H 'sec-fetch-user: ?1' \
  -H 'sec-gpc: 1' \
  -H 'upgrade-insecure-requests: 1' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36' \
  --compressed
maltehuebner commented 2 months ago

@alexs77 Thank you for your bug report. As always, I’m pretty late, but this issue should be fixed now for most login cases.

If the internal server error still occurs, I assume your Strava account has an email address which is already registered in our database via email registration. This is a known issue which I have to fix later.