Skip to content

Commit e1d1c43

Browse files
committed
daily
1 parent 8a74464 commit e1d1c43

8 files changed

Lines changed: 107 additions & 27 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
/*
3+
Plugin Name: Banned E-mail addresses (MU)
4+
Version: 0.1.0
5+
Description: Deny registration with common email addresses.
6+
Plugin URI: https://github.com/szepeviktor/wordpress-plugin-construction
7+
License: The MIT License (MIT)
8+
Author: Viktor Szépe
9+
GitHub Plugin URI: https://github.com/szepeviktor/wordpress-plugin-construction
10+
*/
11+
12+
if ( ! function_exists( 'add_filter' ) ) {
13+
error_log( 'Break-in attempt detected: banned_emails_direct_access '
14+
. addslashes( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' )
15+
);
16+
ob_get_level() && ob_end_clean();
17+
if ( ! headers_sent() ) {
18+
header( 'Status: 403 Forbidden' );
19+
header( 'HTTP/1.1 403 Forbidden', true, 403 );
20+
header( 'Connection: Close' );
21+
}
22+
exit;
23+
}
24+
25+
add_filter( 'registration_errors', 'o1_banned_emails', 10, 3 );
26+
27+
function o1_banned_emails( $errors, $sanitized_user_login, $user_email ) {
28+
29+
// http://kb.mailchimp.com/lists/growth/limits-on-role-based-addresses
30+
$banned_addresses = array(
31+
'abuse',
32+
'admin',
33+
'billing',
34+
'compliance',
35+
'devnull',
36+
'dns',
37+
'ftp',
38+
'hostmaster',
39+
'inoc',
40+
'ispfeedback',
41+
'ispsupport',
42+
'list-request',
43+
'list',
44+
'marketing', // Added
45+
'maildaemon',
46+
'noc',
47+
'no-reply',
48+
'noreply',
49+
'null',
50+
'phish',
51+
'phishing',
52+
'postmaster',
53+
'privacy',
54+
'registrar',
55+
'root',
56+
'security',
57+
'spam',
58+
'support',
59+
'sysadmin',
60+
'tech',
61+
'test',
62+
'undisclosed-recipients',
63+
'unsubscribe',
64+
'usenet',
65+
'uucp',
66+
'webmaster',
67+
'www',
68+
);
69+
70+
$email_parts = explode( '@', $user_email );
71+
72+
if ( in_array( strtolower( $email_parts[0] ), $banned_addresses ) ) {
73+
$errors->add( 'banned_email', 'Registering with this email address is not allowed.' );
74+
}
75+
76+
return $errors;
77+
}

mu-block-shortcodes/block-shortcodes.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<?php
22
/*
33
Plugin Name: Block Shortcodes (MU)
4-
Plugin URI: https://github.com/szepeviktor/wordpress-plugin-construction
5-
Description: Wrap any content in <code>div</code> elements thus enabling content styling with CSS
64
Version: 0.2.0
5+
Description: Wrap any content in <code>div</code> elements thus enabling content styling with CSS
6+
Plugin URI: https://github.com/szepeviktor/wordpress-plugin-construction
77
License: The MIT License (MIT)
88
Author: Viktor Szépe
9-
Author URI: http://www.online1.hu/webdesign/
10-
GitHub Plugin URI: https://github.com/szepeviktor/wordpress-plugin-construction/tree/master/mu-block-shortcodes
9+
GitHub Plugin URI: https://github.com/szepeviktor/wordpress-plugin-construction
1110
*/
1211

1312
if ( ! function_exists( 'add_filter' ) ) {

mu-disable-tgmpa/tgmpa-disable.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

mu-image-upload-control/image-upload-control-hu.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
/**
13-
* Image upload control Hungarian version
13+
* Image upload control Hungarian version.
1414
*
1515
* @package image-upload-control
1616
*/
@@ -63,7 +63,7 @@ public function process_image( $file ) {
6363
}
6464

6565
/**
66-
* Check for problems.
66+
* Check for image problems.
6767
*
6868
* @param array $file Details of file being uploaded.
6969
* @param array $imageinfo Image size data.
@@ -97,7 +97,7 @@ private function image_problems( $file, $imageinfo ) {
9797
. '/i' // Case-insensitive
9898
;
9999
/**
100-
* Filters the file name blacklist regex string.
100+
* Filters the file name blacklist.
101101
*
102102
* @param string $blacklist File name blacklist regex.
103103
* @param string $file The file data.
@@ -113,7 +113,7 @@ private function image_problems( $file, $imageinfo ) {
113113
}
114114

115115
/**
116-
* Filters the upper limit of image's pixel size.
116+
* Filters the upper limit of number of pixels.
117117
*
118118
* Default value is 2173600, FullHD resolution 1920 × 1080
119119
* + 100 000 as sometimes there are more rows/columns
@@ -128,7 +128,7 @@ private function image_problems( $file, $imageinfo ) {
128128
}
129129

130130
/**
131-
* Filters the lower limit of image's pixel size.
131+
* Filters the lower limit of number of pixels.
132132
*
133133
* Default value is 1024, 32 × 32 pixels.
134134
* @param string $imageinfo Minimum pixel size.

mu-image-upload-control/image-upload-control.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
/**
13-
* Image upload control
13+
* Image upload control English version.
1414
*
1515
* @package image-upload-control
1616
*/
@@ -64,7 +64,7 @@ public function process_image( $file ) {
6464
}
6565

6666
/**
67-
* Check for problems.
67+
* Check for image problems.
6868
*
6969
* @param array $file Details of file being uploaded.
7070
* @param array $imageinfo Image size data.
@@ -98,7 +98,7 @@ private function image_problems( $file, $imageinfo ) {
9898
. '/i' // Case-insensitive
9999
;
100100
/**
101-
* Filters the file name blacklist regex string.
101+
* Filters the file name blacklist.
102102
*
103103
* @param string $blacklist File name blacklist regex.
104104
* @param string $file The file data.
@@ -114,7 +114,7 @@ private function image_problems( $file, $imageinfo ) {
114114
}
115115

116116
/**
117-
* Filters the upper limit of image's pixel size.
117+
* Filters the upper limit of number of pixels.
118118
*
119119
* Default value is 2173600, FullHD resolution 1920 × 1080
120120
* + 100 000 as sometimes there are more rows/columns
@@ -129,7 +129,7 @@ private function image_problems( $file, $imageinfo ) {
129129
}
130130

131131
/**
132-
* Filters the lower limit of image's pixel size.
132+
* Filters the lower limit of number of pixels.
133133
*
134134
* Default value is 1024, 32 × 32 pixels.
135135
* @param string $imageinfo Minimum pixel size.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@TODO
2+
3+
- check php version
4+
- php logging
5+
6+
.htaccess
7+
8+
- cache+compress
9+
- wp security per dir
10+
- wp core
11+
12+
- waf
13+
- miniban

wordpress-fail2ban

yoast-seo-disable-json-ld.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
add_filter( 'wpseo_json_ld_output', '__return_empty_array' );

0 commit comments

Comments
 (0)