From 4e8251730fbf6d789d8701261e793d9b6e82f044 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 7 Jan 2018 12:43:20 +0100 Subject: [PATCH] emit warnings on V8 < 6.5.143 also --- README.md | 2 +- config.m4 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce08d15..00d51de 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The extension allows you to execute Javascript code in a secure sandbox from PHP can be restricted using a time limit and/or memory limit. This provides the possibility to execute untrusted code with confidence. -If you execute untrusted JavaScript code, make sure to **use V8 version 6.4.388.18 or higher**. +If you execute untrusted JavaScript code, make sure to **use V8 version 6.4.388.18, 6.5.143 or higher**. See notes on [untrusted code mitigations](https://github.com/v8/v8/wiki/Untrusted-code-mitigations) for further details. diff --git a/config.m4 b/config.m4 index 74bef24..fab921c 100644 --- a/config.m4 +++ b/config.m4 @@ -147,6 +147,9 @@ int main () if test "$V8_API_VERSION" -lt 6004388 ; then AC_MSG_WARN([libv8 prior to 6.4.388.18 is missing speculative execution mitigations]) fi + if test "$V8_API_VERSION" -ge 6005000 -a "$V8_API_VERSION" -lt 6005143 ; then + AC_MSG_WARN([libv8 6.5.x prior to 6.5.143 is missing speculative execution mitigations]) + fi AC_DEFINE_UNQUOTED([PHP_V8_API_VERSION], $V8_API_VERSION, [ ]) AC_DEFINE_UNQUOTED([PHP_V8_VERSION], "$ac_cv_v8_version", [ ]) else