Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2019-05-19 16:06:18 +0300
committerdequis <dx@dxzone.com.ar>2019-05-19 16:06:18 +0300
commit62189dc72593c6e6db00954eb74b79e41d3419e0 (patch)
treefdab31011987d2fe8dcfa11609c61c6aefe88c2c
parent14f1b69b6292bbdc98cca484b050ec8359394c4e (diff)
Fix "No handler found for resource" on alt login
That error is basically a 404 that you get when you set Accept to json in the api.skype.com server. The fix is to grab a new rps URL from skypeweb, it lives in the 'rps' server (edge.skype.com) and has a slightly different path. This also removes the 'skyper' md5-based login. It's still referenced in the javascript of skypeweb, but probably unused because the endpoint is the same we're hitting here and it's dead. SOAP login still works with no issues, for both skype usernames and microsoft accounts (it didn't work with skype usernames when i first wrote this, but i remember at some point later throwing skype usernames at the SOAP login and having it work)
-rw-r--r--skypeweb/libskypeweb.c6
-rw-r--r--skypeweb/skypeweb_login.c36
-rw-r--r--skypeweb/skypeweb_login.h1
3 files changed, 2 insertions, 41 deletions
diff --git a/skypeweb/libskypeweb.c b/skypeweb/libskypeweb.c
index 43a3cbc..9906e17 100644
--- a/skypeweb/libskypeweb.c
+++ b/skypeweb/libskypeweb.c
@@ -347,11 +347,7 @@ skypeweb_login(PurpleAccount *account)
sa->conns = purple_http_connection_set_new();
if (purple_account_get_bool(account, "alt-login", FALSE)) {
- if (!SKYPEWEB_BUDDY_IS_MSN(purple_account_get_username(account))) {
- skypeweb_begin_skyper_login(sa);
- } else {
- skypeweb_begin_soapy_login(sa);
- }
+ skypeweb_begin_soapy_login(sa);
} else {
if (purple_account_get_string(account, "refresh-token", NULL) && purple_account_get_remember_password(account)) {
skypeweb_refresh_token_login(sa);
diff --git a/skypeweb/skypeweb_login.c b/skypeweb/skypeweb_login.c
index c05bbd1..9a35916 100644
--- a/skypeweb/skypeweb_login.c
+++ b/skypeweb/skypeweb_login.c
@@ -374,24 +374,6 @@ fail:
g_free(error);
}
-/* base64(md5(user + "\nskyper\n" + pass)) */
-static gchar *
-skypeweb_skyper_hash(const gchar *username, const gchar *password)
-{
- guint8 hashed[16];
- gsize len = sizeof(hashed);
- GChecksum *gc;
-
- gc = g_checksum_new(G_CHECKSUM_MD5);
- g_checksum_update(gc, (guchar *)username, -1);
- g_checksum_update(gc, (guchar *)"\nskyper\n", -1);
- g_checksum_update(gc, (guchar *)password, -1);
- g_checksum_get_digest(gc, hashed, &len);
- g_checksum_free(gc);
-
- return g_base64_encode(hashed, len);
-}
-
static void
skypeweb_login_get_api_skypetoken(SkypeWebAccount *sa, const gchar *url, const gchar *username, const gchar *password)
{
@@ -426,7 +408,7 @@ skypeweb_login_get_api_skypetoken(SkypeWebAccount *sa, const gchar *url, const g
static void
skypeweb_login_soap_got_token(SkypeWebAccount *sa, gchar *token)
{
- const gchar *login_url = "https://api.skype.com/rps/skypetoken";
+ const gchar *login_url = "https://edge.skype.com/rps/v1/rps/skypetoken";
skypeweb_login_get_api_skypetoken(sa, login_url, NULL, token);
}
@@ -547,19 +529,3 @@ skypeweb_begin_soapy_login(SkypeWebAccount *sa)
g_free(postdata);
}
-
-void
-skypeweb_begin_skyper_login(SkypeWebAccount *sa)
-{
- gchar *hash;
- const gchar *login_url = "https://api.skype.com/login/skypetoken";
- const gchar *username = purple_account_get_username(sa->account);
-
- hash = skypeweb_skyper_hash(username, purple_connection_get_password(sa->pc));
-
- skypeweb_login_get_api_skypetoken(sa, login_url, username, hash);
-
- purple_connection_update_progress(sa->pc, _("Authenticating"), 2, 4);
-
- g_free(hash);
-}
diff --git a/skypeweb/skypeweb_login.h b/skypeweb/skypeweb_login.h
index b8ed589..39cf6f1 100644
--- a/skypeweb/skypeweb_login.h
+++ b/skypeweb/skypeweb_login.h
@@ -29,6 +29,5 @@ void skypeweb_begin_web_login(SkypeWebAccount *sa);
void skypeweb_begin_oauth_login(SkypeWebAccount *sa);
void skypeweb_refresh_token_login(SkypeWebAccount *sa);
void skypeweb_begin_soapy_login(SkypeWebAccount *sa);
-void skypeweb_begin_skyper_login(SkypeWebAccount *sa);
#endif /* SKYPEWEB_LOGIN_H */