Ignore:
Timestamp:
Apr 6, 2018, 3:30:17 PM (7 years ago)
Author:
alloc
Message:

Fixed: Steam OpenID login

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/Web/OpenID.cs

    r314 r316  
    1414        public static class OpenID {
    1515                private const string STEAM_LOGIN = "https://steamcommunity.com/openid/login";
    16                 private static Regex steamIdUrlMatcher = new Regex (@"^http:\/\/steamcommunity\.com\/openid\/id\/([0-9]{17,18})");
     16                private static Regex steamIdUrlMatcher = new Regex (@"^https?:\/\/steamcommunity\.com\/openid\/id\/([0-9]{17,18})");
    1717
    1818                private static readonly X509Certificate2 caCert = new X509Certificate2 (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/steam-rootca.cer");
     
    111111
    112112                public static ulong Validate (HttpListenerRequest _req) {
    113                         if (getValue (_req, "openid.mode") == "cancel") {
     113                        string mode = getValue (_req, "openid.mode");
     114                        if (mode == "cancel") {
    114115                                Log.Warning ("Steam OpenID login canceled");
     116                                return 0;
     117                        }
     118                        if (mode == "error") {
     119                                Log.Warning ("Steam OpenID login error: " + getValue (_req, "openid.error"));
    115120                                return 0;
    116121                        }
Note: See TracChangeset for help on using the changeset viewer.