Undefined index: HTTP_REFERER When Creating New Blog

When I create a new website and click the activation link in the email, I am taken to http://mydomain.com/wp-activate.php?key=96d1062337f9dde9 and it says my new blog is successfully activated but I get an anti-splog stack trace:

Notice: Undefined index: HTTP_REFERER in C:\inetpub\woyal.com\wp-content\plugins\anti-splog\anti-splog.php on line 680

It looks like this line is the culprit:
$api_data['activate_user_referer'] = $_SERVER['HTTP_REFERER'];

Is there something wrong with the plugin?

  • calvinrogercanas
    • New Recruit

    Hey there @adam_fisher,

    Hope you're well! :slight_smile:

    Thank you for your question however I did not receive the same error you got when I tried this. Could you tell me the url in question? I want to register myself also try deactivating all plugins as it maybe a conflict issue.

    Looking forward for your reply! :slight_smile:

    Best Regards,
    Calvin

    P.S I noticed that you are using older version so I suggest you update them to the latest one.

  • adam_fisher
    • Design Lord, Child of Thor

    My site is not public yet. The error happens when I click the activation link in the email (link mentioned in original question). Here is the stack trace:

    Notice: Undefined index: HTTP_REFERER in C:\inetpub\mydomain.com\wp-content\plugins\anti-splog\anti-splog.php on line 680
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0105	156136	{main}( )	..\wp-activate.php:0
    2	0.8726	22519192	wpmu_activate_signup( )	..\wp-activate.php:87
    3	0.9064	22561120	wpmu_create_blog( )	..\ms-functions.php:1022
    4	3.2742	24785632	do_action( )	..\ms-functions.php:1170
    5	3.2764	24787592	call_user_func_array:{C:\inetpub\mydomain.com\wp-includes\plugin.php:496} ( )	..\plugin.php:496
    6	3.2764	24787784	ust_blog_created( )	..\plugin.php:496

    And:

    Notice: Undefined property: stdClass::$public in C:\inetpub\mydomain.com\wp-includes\ms-settings.php on line 184
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0105	156136	{main}( )	..\wp-activate.php:0
    2	0.0107	165120	require( 'C:\inetpub\mydomain.com\wp-load.php' )	..\wp-activate.php:12
    3	0.0109	176112	require_once( 'C:\inetpub\mydomain.com\wp-config.php' )	..\wp-load.php:29
    4	0.0112	223160	require_once( 'C:\inetpub\mydomain.com\wp-settings.php' )	..\wp-config.php:124
    5	0.0246	1699480	require( 'C:\inetpub\mydomain.com\wp-includes\ms-settings.php' )	..\wp-settings.php:94
  • adam_fisher
    • Design Lord, Child of Thor

    I think this is a bug with Anti-Splog. HTTP Referrer should not be trusted because it is up to the client to populate it. It identifies the address of the webpage (i.e. the URI or IRI) that linked to the resource being requested. In my case the activation link is contained in an email so that's probably why there is no page to refer.

  • calvinrogercanas
    • New Recruit

    Hi @adam_fisher,

    Thanks for your reply and sorry for the long delay.

    I just tried this with my own install but I can't see any problem. Could you upgrade to the latest version and try this again? If still doesn't work and let me know and I will flag a Second-Line Support to look this for you. I also suggest that you follow this manual before we dig deeper: https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Have a great day.

    Kind Regards,
    Calvin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.