瀏覽代碼

- fixed security issue with mtwin.web.Request getInt() and getFloat() which returned null when encountering 'NULL' string even when an optional value was used, this situation now throws a DEPRECATED exception (to detect NULL cases).

Laurent Bedubourg 16 年之前
父節點
當前提交
7be9a9de2f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      std/mtwin/web/Request.hx

+ 2 - 2
std/mtwin/web/Request.hx

@@ -74,7 +74,7 @@ class Request {
 		if( params.exists(key) ){
 			var v = params.get(key);
 			if( v == "NULL" )
-				return null;
+				throw "DEPRECATED";
 			return Std.parseInt(v);
 		}
 		return or;
@@ -84,7 +84,7 @@ class Request {
 		if( params.exists(key) ){
 			var v = params.get(key);
 			if( v == "NULL" )
-				return null;
+				throw "DEPRECATED";
 			return Std.parseFloat(v);
 		}
 		return or;