Session expired or cookies are not enabled (Spoof Check Not Working)

9 months 3 weeks ago #329113 by kurtboeker
Users have been reporting this error and are unable to register or login even though "Spoof Checking" is disabled. I made these two changes to comprofiler.php and it seemed to resolve the issue. I hope this can be fixed in the core so I don't have to apply this fix every time I update!
	// Joomla: 3.10.8
	// Community Builder: 2.7.2+build.2022.04.04.14.48.13.82302828e
	// PHP: 7.4.28
	// SQL: 5.7.37
	// components/com_comprofiler/comprofiler.php ~#1177

	//$spoofCheckOk				=	false;
	$spoofCheckOk				=	true; // -JM 2022APR06
	
	if ( cbSpoofCheck( 'login', 'POST', 2 ) ) {
		$spoofCheckOk			=	true;
	}

	//if ( ! $spoofCheckOk ) {
	if ($spoofCheckOk == false) { // -JM 2022APR06
		$_CB_framework->enqueueMessage( CBTxt::Th( 'UE_SESSION_EXPIRED', 'Session expired or cookies are not enabled in your browser. Please press "reload page" in your browser, and enable cookies in your browser.' )
			. ' '
			. CBTxt::Th( 'UE_PLEASE_REFRESH', 'Please refresh/reload page before filling-in.' ), 'error' );
		return;
	}

Please Log in to join the conversation.

9 months 3 weeks ago #329120 by krileon
Your fix is just forcing the spoof checking off at all times. The spoof check is there to stop people from sending requests to the login form externally. Do not remove that. You need to figure out why your site is losing the spoof data in the POST. Are you using a custom login module or made modifications to the login module? Note your change doesn't apply the registration.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.178 seconds

Facebook Twitter LinkedIn