Error redirecting to potential insecure url

Athlon
User w
User w
Posts: 12
Joined: Sun Feb 12, 2017 2:56 pm

Error redirecting to potential insecure url

Post by Athlon »

Thank you for your great plugin!

I'm getting this error, so I went to your hints page here:

https://www.axew3.com/w3/2016/02/phpbb- ... subdomain/

The code to look for in my functions.php file is a little different than the code you have listed. I just did a fresh install of phpbb 3.2.

I inserted you insert code after:

Code: Select all

	global $user, $phpbb_path_helper, $phpbb_dispatcher;
but I still get the error.

Can you help?
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Error redirecting to potential insecure url

Post by axew3 »

which are urls where your forum and your wp are installed?
If you simply add, after globals declaration code line,
just
$disable_cd_check = false
it is not a secure redirect, but have you try if it work in this way (or without adding nothing)?
if adding $disable_cd_check = false work fine it depend due to the

Code: Select all

$w3ck = preg_replace('/^[^\.]*\.([^\.]*)\.(.*)$/', '\1.\2',$url);
code snippet fail to recognize the correct that should.
Athlon
User w
User w
Posts: 12
Joined: Sun Feb 12, 2017 2:56 pm

Re: Error redirecting to potential insecure url

Post by Athlon »

Thank you for your quick reply!

My WP home page is here for now (until it is completed): http://warhawksclan.com/wordpress/

My new forum is here for now (until it is completed): http://www.warhawksclan.com/whphpbb3/

When I change that section in functions.php to:

Code: Select all

function redirect($url, $return = false, $disable_cd_check = false)
{
	global $user, $phpbb_path_helper, $phpbb_dispatcher;
	
	$disable_cd_check = false

	if (!$user->is_setup())
	{
		$user->add_lang('common');
	}
I get the following error:

Parse error: syntax error, unexpected 'if' (T_IF) in /home/warhaw5/public_html/whphpbb3/includes/functions.php on line 1715
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Error redirecting to potential insecure url

Post by axew3 »

Code: Select all

$disable_cd_check = false
miss ;
change into

Code: Select all

$disable_cd_check = false;
Athlon
User w
User w
Posts: 12
Joined: Sun Feb 12, 2017 2:56 pm

Re: Error redirecting to potential insecure url

Post by Athlon »

:lol:

I missed it too - Thank you for your great support! That fixed it for me!!

:D
elawrenc01
User ww
User ww
Posts: 43
Joined: Thu Feb 16, 2017 11:59 am

Re: Error redirecting to potential insecure url

Post by elawrenc01 »

I was getting the redirect error as well but this method didn't work for me. I received an error 500 when I applied that code to phpbb includes/functions.php
Post Reply