News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

cURL login broke after upgrade to 2.0.15

Started by voidfaction, November 03, 2018, 08:13:05 PM

Previous topic - Next topic

voidfaction

My gaming friends use a SMF forum to chat and was using smf 2.0.13 but recently upgraded to 2.0.15 and it breaks my php cURL login I had to help get basic updates without actually going to the site. Prefer my own homepage that receives posts from multiple locations/sites in a format that suits me

with 2.0.13 I could use curl_setopt($ch, CURLOPT_POSTFIELDS, "user=user&passwrd=password&cookielength=-1);
now with 2.0.15 login no longer works.
Did something change that i need to hash the password using the sessionVar and SessionId now or just include the sessionVar/Id to the end of the CURLOPT_POSTFIELDS?

vbgamer45

yes the session variable is now required in order to login it is now passed and verified.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

voidfaction

Thank you very much.
Your reply saved me a bit of time and got it working again.
I was working on hash password route in php and hit a wall getting the hash to match what the sha1.js would get. Even though it is now working I am still going to figure out the sha1 for the learning experience.
You have a hxxp:paypal.me [nonactive] or a way I can give you a tip for your help?

Arantor

Don't bother with the SHA1 part, this is going away in SMF 2.1.

voidfaction

Good to know thanks. I guess I should probably start playing around with 2.1 beta now to help push my host member to upgrade and be ready for anything it might break with my curl script when it is out of beta. Was a big surprise when he upgraded to 2.0.15 without warning.

My searches for curl help keeps taking me to answers to use ssi.php but as far as i know only works on same domain/server and if it didn't would probably require the host to give me more admin rights than he would probably be comfortable with. As an amature hobby programmer I guess doing things the curl way is a nice learning experience but still has me far away from having my own personal site that shows all my social media and forums in 1 place (Lord of the Websites: One site to view them all) lol. A big plan for an amature hobby programmer that gets scared with anything OOP

vbgamer45

Example SSI remote function call simplemachines.org/community/SSI.php?ssi_function=recentPosts

If enabled you can pull data in this way.

OOP isn't really needed for most projects. I function find without it and using it when working with certain classes. I tend to find it makes projects more complicated and it is a different way of thinking.

Attached screenshot of my overview of my sites that I manage
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

voidfaction

Looks like you got plenty to keep you busy. lol
I will definitely look into ssi.php more.
Does the host have to give me more admin rights to be able to use if enabled? He knows I use scripts to scrape data but doubt he would up my admin rights to do it easier with less bandwidth for the both of us (not like our little gaming community is putting a dent on bandwidth usage) but would be nice to have my site much faster using ssi.php than the slow curl way.

vbgamer45

SSI is normally enabled by default but it can be disabled on the forum.

It is based on your session when connected to SSI as well. If you want to see other data then it would have to be your user that is logged in.
If just want general data that is publicly accessible then SSI would work for that.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: