-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from alibaba/branch_version_3.3.1.dev
3.3.1 release
- Loading branch information
Showing
44 changed files
with
184 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ QLExpress脚本引擎被广泛应用在阿里的电商业务场景,具有以 | |
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>QLExpress</artifactId> | ||
<version>3.3.0</version> | ||
<version>3.3.1</version> | ||
</dependency> | ||
``` | ||
|
||
|
@@ -371,7 +371,7 @@ private boolean isTrace = false; | |
* @return | ||
* @throws Exception | ||
*/ | ||
Object execute(String expressString, IExpressContext<String, Object> context, List<String> errorList, boolean isCache, boolean isTrace, Log aLog); | ||
Object execute(String expressString, IExpressContext<String, Object> context, List<String> errorList, boolean isCache, boolean isTrace); | ||
``` | ||
|
||
## 3、功能扩展API列表 | ||
|
@@ -809,11 +809,31 @@ assertEquals("t", expressRunner.execute("test.a", context, | |
null, false, true)); | ||
``` | ||
|
||
在沙箱模式下,为了进一步保障内存的安全,建议同时限制脚本能够申请的最大数组长度以及超时时间,设置方法如下: | ||
|
||
`com.ql.util.express.test.ArrayLenCheckTest` | ||
|
||
```java | ||
// 限制最大申请数组长度为10, 默认没有限制 | ||
QLExpressRunStrategy.setMaxArrLength(10); | ||
ExpressRunner runner = new ExpressRunner(); | ||
String code = "byte[] a = new byte[11];"; | ||
try { | ||
// 20ms 超时时间 | ||
runner.execute(code, new DefaultContext<>(), null, false, false, 20); | ||
Assert.fail(); | ||
} catch (QLException e) { | ||
} | ||
|
||
QLExpressRunStrategy.setMaxArrLength(-1); | ||
// 20ms 超时时间 | ||
runner.execute(code, new DefaultContext<>(), null, false, false, 20); | ||
``` | ||
|
||
附录: | ||
[版本更新列表](VERSIONS.md) | ||
|
||
## links for us | ||
- Gitter channel - Online chat room with QLExpress developers. [Gitter channel ](https://gitter.im/QLExpress/Lobby) | ||
- email:tianqiao@alibaba-inc.com,[email protected] | ||
- wechart:371754252 | ||
- QLExpress blogs: https://yq.aliyun.com/album/130 | ||
- wechart:371754252 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.