diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-25 16:57:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-25 16:57:18 +0000 |
commit | d2a51dc68f19b260883a9f35b6e150f08c01f63d (patch) | |
tree | 498a8c7b6afd90d49e7c85eed501da0039e8dfcd /protocols/VKontakte/src/misc.cpp | |
parent | 4007fd83daf5be1b0a8d9bc5a9a3f5dfff4323c3 (diff) |
VK:
- stupid password length limitation of 30 chars removed (thanks emx for pointing me to);
- cancel in captcha form now stops the login process.
git-svn-id: http://svn.miranda-ng.org/main/trunk@6626 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index f4c2a86439..c412e3ca5c 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -164,13 +164,15 @@ LBL_NotFound: return CMStringA(p1, (int)(p2-p1));
}
-CMStringA CVkProto::AutoFillForm(char *pBody, CMStringA &szAction)
+bool CVkProto::AutoFillForm(char *pBody, CMStringA &szAction, CMStringA& szResult)
{
+ szResult.Empty();
+
char *pFormBeg = strstr(pBody, "<form ");
- if (pFormBeg == NULL) return "";
+ if (pFormBeg == NULL) return false;
char *pFormEnd = strstr(pFormBeg, "</form>");
- if (pFormEnd == NULL) return "";
+ if (pFormEnd == NULL) return false;
*pFormEnd = 0;
@@ -193,7 +195,8 @@ CMStringA CVkProto::AutoFillForm(char *pBody, CMStringA &szAction) else if (name == "captcha_key") {
char *pCaptchaBeg = strstr(pFormBeg, "<img id=\"captcha\"");
if (pCaptchaBeg != NULL)
- RunCaptchaForm( getAttr(pCaptchaBeg, "src"), value);
+ if ( !RunCaptchaForm( getAttr(pCaptchaBeg, "src"), value))
+ return false;
}
if ( !result.IsEmpty())
@@ -203,7 +206,8 @@ CMStringA CVkProto::AutoFillForm(char *pBody, CMStringA &szAction) }
}
- return result;
+ szResult = result;
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
|