-
Notifications
You must be signed in to change notification settings - Fork 2
/
sa_xss_off.php
executable file
·43 lines (35 loc) · 1.15 KB
/
sa_xss_off.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
Plugin Name: sa_tags
Description: Sends header to disable cient based XSS protection
Version: 1.1
Author: Shawn Alverson
Author URI: http://www.shawnalverson.com/
*/
$PLUGIN_ID = "sa_xss_off";
$PLUGINPATH = "$SITEURL/plugins/$PLUGIN_ID/";
$sa_url="http://tablatronix.com/getsimple-cms/sa-x-xss-off/";
# get correct id for plugin
$thisfile=basename(__FILE__, ".php");
# register plugin
register_plugin(
$thisfile, //Plugin id
'SA X-XSS off', //Plugin name
'1.1', //Plugin version
'Shawn Alverson', //Plugin author
$sa_url, //author website
'Disables Client XSS Filters', //Plugin description
'', //page type - on which admin tab to display
'' //main function (administration)
);
# activate action
add_action('admin-pre-header',$PLUGIN_ID."_action");
# Functions
function sa_xss_off_action(){
if(pageCheck('edit.php') or pageCheck('components.php') or pageCheck('settings.php') or pageCheck('profile.php')) header("X-XSS-Protection: 0");
}
function pageCheck($page)
{
return basename($_SERVER['PHP_SELF']) == $page;
}
?>