[interchange] * Safe status could be confused if empty-body perl tag called,

Mike Heins interchange-cvs at icdevgroup.org
Thu Feb 2 13:37:50 UTC 2017


commit 2ec6dfa797bbd73849047f0a40757850a66749fa
Author: Mike Heins <mikeh at endpoint.com>
Date:   Thu Feb 2 08:36:58 2017 -0500

    * Safe status could be confused if empty-body perl tag called,
      again introduced by change of position in $MVSAFE::Safe.

 lib/Vend/Interpolate.pm |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Interpolate.pm b/lib/Vend/Interpolate.pm
index c472855..fb89ec8 100644
--- a/lib/Vend/Interpolate.pm
+++ b/lib/Vend/Interpolate.pm
@@ -1684,7 +1684,11 @@ sub tag_perl {
 
 	# Skip costly eval of code entirely if perl tag was called with no code,
 	# likely used only for the side-effect of opening database handles
-	return if $body !~ /\S/;
+	
+	if($body !~ /\S/) {
+		undef $MVSAFE::Safe;
+		return;
+	}
 
 	$body =~ tr/\r//d if $Global::Windows;
 



More information about the interchange-cvs mailing list