1 Commits
Author SHA1 Message Date
Andrey Savchenko 8875774ddb Fixed non-ASCII characters in Server Timing headers
Fixes #48
2020-11-16 16:17:03 +02:00
3 changed files with 8 additions and 2 deletions

No files matched your search

+5
View File
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased
## 3.3.4 - 2020-11-16
### Fixed
- non-ASCII characters in Server Timing headers
## 3.3.3 - 2020-03-11
### Fixed
+1 -1
View File
@@ -5,7 +5,7 @@ Plugin Name: Laps
Plugin URI: https://github.com/Rarst/laps
Description: Light WordPress profiler.
Author: Andrey “Rarst” Savchenko
Version: 3.3.3
Version: 3.3.4
Author URI: https://www.rarst.net/
Text Domain: laps
Domain Path: /lang
+2 -1
View File
@@ -68,7 +68,8 @@ class Server_Timing_Manager {
}
}
header( 'Server-Timing: ' . preg_replace( '/\R/', '', $header ) );
// Sanitize to visible US ASCII character range (32-126).
header( 'Server-Timing: ' . preg_replace( '/[^\x20-\x7E]/', '', $header ) );
return $input;
}