GithubHelp home page GithubHelp logo

Comments (8)

stewartmiles avatar stewartmiles commented on May 28, 2024

from quickstart-unity.

AIGameStudio avatar AIGameStudio commented on May 28, 2024

@stewartmiles No i am seeing the shortlink which was generated from the long dynamic link

This is what i am seeing "https://xxxxx.app.goo.gl/w7EYt3lsMzyVpaP32"

My long dynamic link was

https://xxxxx.app.goo.gl/?link=https%3a%2f%2fpsnow.co%2finvitation_to_table%3froomid%3dfast-and-furious%26subroomid%3dfast-and-furious-d70b1c8a-a2d7-467e-b685-9e6a2e643806%2f&apn=com.zigbee.pokersquare&ibi=com.zigbee.pokersquare

from quickstart-unity.

stewartmiles avatar stewartmiles commented on May 28, 2024

from quickstart-unity.

AIGameStudio avatar AIGameStudio commented on May 28, 2024

I tried it and it works fine on Unity Editor. But when running on iOS i am getting this exception

Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0
Rethrow as WebException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in :0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in :0
at LongDynamicUrl.GetFinalRedirectedUrl (System.String url, System.Action`1 onDynamicLinkFetched) [0x00000] in :0
at Firebase.Invites.FirebaseInvites+Listener.TrySendCachedMessage () [0x00000] in :0
at Firebase.AppUtil.PollCallbacks () [0x00000] in :0

from quickstart-unity.

stewartmiles avatar stewartmiles commented on May 28, 2024

from quickstart-unity.

AIGameStudio avatar AIGameStudio commented on May 28, 2024

Still same issue. My method to get the long dynamic url is

public static void GetFinalRedirectedUrl(string url, Action onDynamicLinkFetched) {
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.AllowAutoRedirect = false;
webRequest.Timeout = 10000;
webRequest.Method = "HEAD";
HttpWebResponse webResponse;
using (webResponse = (HttpWebResponse)webRequest.GetResponse()){
if ((int)webResponse.StatusCode >= 300 && (int)webResponse.StatusCode <= 399) {
string uriString = webResponse.Headers["Location"];
onDynamicLinkFetched(uriString);
}else {
onDynamicLinkFetched(null);
}
webResponse.Close();
}
}

Please tell me what to change make it work.

from quickstart-unity.

stewartmiles avatar stewartmiles commented on May 28, 2024

from quickstart-unity.

AIGameStudio avatar AIGameStudio commented on May 28, 2024

Adding this
ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback;
before sending request worked

private static bool MyRemoteCertificateValidationCallback(System.Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) {
bool isOk = true;
if (sslPolicyErrors != SslPolicyErrors.None) {
for (int i=0; i<chain.ChainStatus.Length; i++) {
if (chain.ChainStatus [i].Status != X509ChainStatusFlags.RevocationStatusUnknown) {
chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain;
chain.ChainPolicy.RevocationMode = X509RevocationMode.Online;
chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan (0, 1, 0);
chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags;
bool chainIsValid = chain.Build ((X509Certificate2)certificate);
if (!chainIsValid) {
isOk = false;
}
}
}
}
return isOk;
}

DO YOU THINK THERE WILL BE SOME SECURITY ISSUES.

from quickstart-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.