| @@ -35,9 +35,15 @@ | ||
| 35 | 35 | * @param string[] $args Positional args. |
| 36 | 36 | */ |
| 37 | 37 | public function scan( array $args ): void { |
| 38 | 38 | foreach ( $args as $url ) { |
| 39 | - $probe = add_query_arg( 'easyfonts_probe', '1', $url ); | |
| 39 | + $probe = add_query_arg( | |
| 40 | + array( | |
| 41 | + 'easyfonts_probe' => Settings::warm_key(), | |
| 42 | + 'efbust' => (string) time(), | |
| 43 | + ), | |
| 44 | + $url | |
| 45 | + ); | |
| 40 | 46 | |
| 41 | 47 | $response = wp_remote_get( |
| 42 | 48 | $probe, |
| 43 | 49 | array( |
| @@ -96,8 +102,9 @@ | ||
| 96 | 102 | ( new UsageTracker() )->truncate(); |
| 97 | 103 | |
| 98 | 104 | delete_option( 'easyfonts_processed_local' ); |
| 99 | 105 | delete_option( 'easyfonts_processed_external' ); |
| 106 | + delete_option( 'easyfonts_warm_key' ); // Rotate the loopback secret. | |
| 100 | 107 | |
| 101 | 108 | $settings = Settings::all(); |
| 102 | 109 | $settings['detectors'] = array(); |
| 103 | 110 | Settings::save( $settings ); |
| @@ -114,8 +121,9 @@ | ||
| 114 | 121 | ( new Storage() )->purge(); |
| 115 | 122 | |
| 116 | 123 | delete_option( 'easyfonts_processed_local' ); |
| 117 | 124 | delete_option( 'easyfonts_processed_external' ); |
| 125 | + delete_option( 'easyfonts_warm_key' ); // Rotate the loopback secret. | |
| 118 | 126 | |
| 119 | 127 | $settings = Settings::all(); |
| 120 | 128 | $settings['detectors'] = array(); |
| 121 | 129 | Settings::save( $settings ); |