A quick workaround for this issue

Open /ubb/scripts/changeprefs.inc.php in an editor and replace the following line near at the end:
Code
header("Location: $curl");

with:
Code
	if( substr( $curl, 0, 2 ) == "//" ) {
	    header("Location: $curl");
	}

This will add an additional check for the curl parameter