Skip to content

Commit 69ffbc4

Browse files
committed
Add ABSPATH check to all PHP files for security
Added `if ( ! defined( 'ABSPATH' ) ) { exit; }` to the top of all PHP files to prevent direct access and improve security. Updated .gitignore to clean up formatting and ignore .claude. Updated README to reflect compatibility with WordPress 6.9. Added microsub.zip to the repository.
1 parent 1631781 commit 69ffbc4

13 files changed

+46
-5
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Dependencies
2-
/vendor/
3-
/node_modules/
2+
/vendor
3+
/node_modules
44

55
# IDE
6-
.idea/
7-
.vscode/
6+
.idea
7+
.vscode
8+
.claude
89
*.sublime-project
910
*.sublime-workspace
1011

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- Donate link: https://notiz.blog/donate/
55
- Tags: microsub, indieweb, reader, feeds, rss
66
- Requires at least: 6.2
7-
- Tested up to: 6.7
7+
- Tested up to: 6.9
88
- Stable tag: 1.0.0
99
- Requires PHP: 7.4
1010
- License: GPL-2.0-or-later

includes/adapters/class-activitypub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub\Adapters;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
use Microsub\Adapter;
1115
use Activitypub\Collection\Following;
1216
use Activitypub\Collection\Remote_Actors;

includes/adapters/class-friends.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub\Adapters;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
use Microsub\Adapter;
1115

1216
/**

includes/adapters/class-wordpress.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub\Adapters;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
use Microsub\Adapter;
1115

1216
/**

includes/class-adapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
/**
1115
* Abstract Class Adapter
1216
*

includes/class-autoloader.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
/**
1115
* An Autoloader that respects WordPress's filename standards.
1216
*/

includes/class-error.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
namespace Microsub;
1111

12+
if ( ! defined( 'ABSPATH' ) ) {
13+
exit;
14+
}
15+
1216
/**
1317
* Class Error
1418
*

includes/class-microsub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
/**
1115
* Microsub Class.
1216
*

includes/class-rest-controller.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Microsub;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
/**
1115
* Class Rest_Controller
1216
*

0 commit comments

Comments
 (0)