Windows/Firefox fail to log in
disconsented opened this issue · 5 comments
Describe the bug
Trying to log in to the client with Firefox as the default browser, OpenID connect consent is successfully given, and we get redirected to something like http://127.0.0.1:64351/?code=NXq-MmI7GkHYWyi7KAVKa3sqoc102bTWmvTRUNCATED&scope=openid+offline+public_profile+upload_map+upload_mod+lobby&state=YqWppNPOzAQsoyJ8wU0OOGrlbSTRUNCATED
, where the client then reports what's below.
This doesn't happen in edge, so I assume it's a Windows/FF specific issue.
Log or error message
Client Version: 2023.12.3
java.lang.IllegalStateException: Could not extract value with pattern 'code=([^ &]+)' from: zv�%�H�@�Ҁ-g]>4�R`&V.�M�4���e y.S�;��ݯ/\��+i�?��.��xŅ�da(�"�+�/̨̩�,�0�
at com.faforever.client.login.OAuthValuesReceiver.extractValue(OAuthValuesReceiver.java:141)
at com.faforever.client.login.OAuthValuesReceiver.readValues(OAuthValuesReceiver.java:133)
at com.faforever.client.login.OAuthValuesReceiver.readValues(OAuthValuesReceiver.java:91)
at com.faforever.client.login.OAuthValuesReceiver.lambda$receiveValues$0(OAuthValuesReceiver.java:52)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
OS
Windows
Cant reproduce on FF with Linux
Does the URL really contain http://
or https://
? Because it looks like encrypted data being sent to an HTTP port.
Browsers may redirect you to HTTPS if you ever visited a website via HTTPS. Google HSTS
. AFAIK, Chrome only does this for hostnames, not IP-Adresses, but I'm not sure about this and I don't know what Firefox does. Try deleting HSTS for 127.0.0.1 (or localhost) in Firefox
Hmmm yeah I guess that would explain the characters. I guess I never really expected browsers to redirect localhost to https since I thought the server normally controlled the redirects.
If this is the case it's kind of a no-win scenario. Even if we offer https the browser will complain because we can't offer a valid certificate...
Yep, my browser was going to HTTPS first due to the Smart HTTPS
plugin, disable that, and it all works fine.