Changeset 316 for binary-improvements


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

Fixed: Steam OpenID login

Location:
binary-improvements/MapRendering
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/ModInfo.xml

    r314 r316  
    55                <Description value="Render the game map to image map tiles as it is uncovered" />
    66                <Author value="Christian 'Alloc' Illy" />
    7                 <Version value="23" />
     7                <Version value="24" />
    88                <Website value="http://7dtd.illy.bz" />
    99        </ModInfo>
  • 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.