Skip to content

Commit 1f1ff65

Browse files
committed
WordPress.org Key #1 is only valid for two years, expire it after that time.
1 parent fd18e2d commit 1f1ff65

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/wp-admin/includes/file.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,10 +1212,14 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
12121212
* @return array List of hex-encoded Signing keys.
12131213
*/
12141214
function wp_trusted_keys() {
1215-
$trusted_keys = array(
1216-
// TODO: Fill with WordPress.org keys x2.
1217-
'fRPyrxb/MvVLbdsYi+OOEv4xc+Eqpsj+kkAS6gNOkI0=', // WordPress.org Test Key #1
1218-
);
1215+
$trusted_keys = array();
1216+
1217+
if ( time() < 1617235200 ) {
1218+
// WordPress.org Key #1 - This key is only valid before April 1st, 2021.
1219+
$trusted_keys[] = 'fRPyrxb/MvVLbdsYi+OOEv4xc+Eqpsj+kkAS6gNOkI0=';
1220+
}
1221+
1222+
// TODO: Add key #2 with longer expiration.
12191223

12201224
/**
12211225
* Filter the valid Signing keys used to verify the contents of files.

0 commit comments

Comments
 (0)