username0x0a / eternityplugins

Collection of self-made or modded Miranda IM plugins
0 stars 0 forks source link

SSL Support for Facebook #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've added a "AddHTTPS" function which adds an "s" to the URLs if an option is 
enabled. I call it from save_url (for avatars) and in choose_server, for 
connection. I hope you don't consider this too invasive.

Have a nice day!

http://forums.miranda-im.org/showthread.php?21867-Facebook-Plugin-Discussion&p=2
09592#post209592

Original issue reported on code.google.com by venom.ze...@gmail.com on 19 Nov 2010 at 8:56

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks :) Your solution was a little but complicated with no reason, but thanks 
for watching the code.

Original comment by n3weRm0re.ewer on 27 Dec 2010 at 3:27

GoogleCodeExporter commented 9 years ago
Are you talking about the .vcproj part? Because for the rest it looked minimal
to me.
Happy you implemented it! You should publicize it, it's an interesting feature
IMHO. 

Original comment by venom.ze...@gmail.com on 27 Dec 2010 at 3:35

GoogleCodeExporter commented 9 years ago
1) venom.zero.zero: when using your "solution" (i mean that replace http: with 
https:) it can be done with editing only one function, (like) this: 

std::string facebook_client::choose_request_url( int request_type, std::string* 
data )
{
    std::string url = choose_proto( request_type );
    url.append( choose_action( request_type, data ) );
    if (DBGetContactSettingByte(NULL,parent->m_szModuleName,FACEBOOK_KEY_USE_HTTPS, 0)) {
        utils::text::replace_first( &url, "http://", "https://" ); }
    return url;
}

2) Jarvis solution is nicer but dont know if function like this needed :)
--

Anyway... you forgot avatars ;) When using http, avatar server is:
  http://profile.ak.fbcdn.net
but when https, it is:
  https://fbcdn-profile-a.akamaihd.net

Original comment by ROBYER on 27 Dec 2010 at 1:24

GoogleCodeExporter commented 9 years ago
Yeah, its solution it's much better. I made the patch too quickly and my
inexperience with the code made it ugly.

Didn't noticed that, however, I'll let Jarvis fix that :)

Have a nice day!

Original comment by venom.ze...@gmail.com on 27 Dec 2010 at 1:49