Use XF session to verify via curl

Attack

Forum Üyesi
4 Şub 2023
2,618
0
0
Hello all.

I'm attempting to verify that the user is logged into their xenforo account via cURL and a C++ application.
I would like to avoid using the API due to the insecure nature of an API key in a compiled file which will be sent to forum members.
So far I've been able to verify the user is logged in when I access this php via the browser I'm logged into.
PHP:
XF::start($fileDir); $app = XF::setupApp('XF\Pub\App'); $app->start(); $user=XF::visitor(); if (!$user->user_id) {...


 
Üst