I encountered relay interesting problem.
I have this condition in external file which is called and after process code redirects to page set via BACKLINK
post parameter like this.
if(isset($_POST['secureLogout']))
{
$_POST['backlink'] = '/';
session_destroy();
System::WriteLog('Session has been destroyed');
}
and even I don't post secureLogout
parameter it still trigger, so I tried to var_dump
POST variables, there is no secureLogout
parameter.
so then I tried put my POST inside condition with exit to see what is in my post..
if(isset($_POST['secureLogout']))
{
var_dump($_POST); exit();
$_POST['backlink'] = '/';
session_destroy();
System::WriteLog('Session has been destroyed');
}
and NOW magic happens It does not trigger
the code continue and everything works fine, but i cant logout now directly cause of exit before session destroy.
So basically how is it even possible that content inside IF has any effect on condition??
It is completely UN-logical and I lost my patience, I tried change post names, conditions but result is same.
If there is exit inside condition, condition is false, if there is no exit condition is true.
EDIT
I changed if condition to $_POST['secureLogout'] == 'secureLogout' problem still remained then i changed condition to
$_POST['secureLogout'] == 'secureLogout123'
which has to be false everytime and it is session is not destroyed, so I put exit inside again and changed condition back
$_POST['secureLogout'] == 'secureLogout'
with exit, condition does not tirgger so $_POST secureLogout parameter is either different or is not set
I removed exit and session been destroied...
Check the amount of parameters available to be post in phpini. Maybe you are trying to post too many variables which overflow the capacity and cause the script to crash.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments