1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00
osu-lazer/osu.Game/Online
Bartłomiej Dach 000ddc14ac
Fix broken locking in OAuth
Closes https://github.com/ppy/osu/issues/26824... I think?

Can be reproduced via something like

diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs
index 485274f349..e6e93ab4c7 100644
--- a/osu.Game/Online/API/OAuth.cs
+++ b/osu.Game/Online/API/OAuth.cs
@@ -151,6 +151,11 @@ internal string RequestAccessToken()
         {
             if (!ensureAccessToken()) return null;

+            for (int i = 0; i < 10000; ++i)
+            {
+                _ = Token.Value.AccessToken;
+            }
+
             return Token.Value.AccessToken;
         }

The cause is `SecondFactorAuthForm` calling `Logout()`, which calls
`OAuth.Clear()`, _while_ the `APIAccess` connect loop is checking if
`authentication.HasValidAccessToken` is true, which happens to
internally check `Token.Value.AccessToken`, which the clearing of
tokens can brutally interrupt.
2024-01-30 21:05:23 +01:00
..
API Fix broken locking in OAuth 2024-01-30 21:05:23 +01:00
Chat Fix incorrect handling of StartChatRequest in websocket chat client 2024-01-29 19:22:40 +01:00
Leaderboards Reduce enumerator overhead in GameplayLeaderboard 2024-01-23 05:31:53 +09:00
Metadata Fix users blipping online briefly before their online status is known 2024-01-02 14:07:59 +01:00
Multiplayer Rename LoadAborted -> GameplayAborted, AbortGameplayReal -> AbortMatch 2023-12-01 18:26:59 +09:00
Notifications/WebSocket Remove no longer relevant changes 2024-01-29 09:05:03 +01:00
Placeholders Fix various other inspections 2023-10-17 17:48:51 +09:00
Rooms Use ID rather than SoloScoreID 2023-10-16 12:02:55 +02:00
Solo Add Statistics bindable to IAPIProvider and update it from SoloStatisticsWatcher 2024-01-03 14:37:57 +06:00
Spectator Merge pull request #25522 from bdach/no-concurrent-connections 2023-11-28 19:09:38 +09:00
BeatmapDownloadTracker.cs Bring realm library up-to-date 2023-07-06 13:37:43 +09:00
DevelopmentEndpointConfiguration.cs Remove no longer relevant changes 2024-01-29 09:05:03 +01:00
DownloadState.cs Fix playlist items showing download button briefly during initial local presence checks 2022-09-08 17:10:45 +09:00
DownloadTracker.cs Partial everything 2022-11-27 00:00:27 +09:00
EndpointConfiguration.cs Update endpoints to final production endpoints 2024-01-30 18:40:17 +09:00
HubClient.cs Rename StartAsync -> ConnectAsync 2022-11-02 11:44:16 +09:00
HubClientConnector.cs Centralise and improve messaging around online state 2023-11-21 15:15:46 +09:00
IHubClientConnector.cs Implement client-side disconnection flow 2023-11-21 15:15:45 +09:00
ILinkHandler.cs Add and use ILinkHandler interface 2022-06-20 20:04:21 +02:00
IStatefulUserHubClient.cs Implement client-side disconnection flow 2023-11-21 15:15:45 +09:00
OnlineStatusNotifier.cs Handle forced logouts due to password change too 2024-01-26 10:53:27 +01:00
OnlineViewContainer.cs Update APIState checks 2023-11-16 20:39:23 +09:00
PersistentEndpointClient.cs Add/adjust xmldocs 2022-11-02 13:16:34 +09:00
PersistentEndpointClientConnector.cs Implement client-side disconnection flow 2023-11-21 15:15:45 +09:00
PollingComponent.cs Partial everything 2022-11-27 00:00:27 +09:00
ProductionEndpointConfiguration.cs Remove no longer relevant changes 2024-01-29 09:05:03 +01:00
ScoreDownloadTracker.cs Add LegacyOnlineID handling to places that definitely need it 2023-10-16 11:20:02 +02:00
SignalRDerivedTypeWorkaroundJsonConverter.cs Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
SignalRUnionWorkaroundResolver.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
SignalRWorkaroundTypes.cs Simplify UserActivity for serialisability over the wire 2023-12-06 18:52:26 +01:00