OGNL
| OGNL | |
|---|---|
| Developer | OGNL Technology |
| Stable release | 3.0.8
/ September 24, 2013 |
| Repository |
|
| Written in | Java |
| Engine | |
| Operating system | Cross-platform |
| Platform | Java Virtual Machine |
| Type | Expression Language (EL) |
| License | BSD License |
| Website | http://commons.apache.org/ognl/ |
Object-Graph Navigation Language (OGNL) is an open-source Expression Language (EL) for Java, which, while using simpler expressions than the full range of those supported by the Java language, allows getting and setting properties (through defined setProperty and getProperty methods, found in JavaBeans), and execution of methods of Java classes. It also allows for simpler array manipulation.
It is aimed to be used in Java EE applications with taglibs as expression language.
OGNL was created by Luke Blanshard and Drew Davidson of OGNL Technology.[1] OGNL development was continued by OpenSymphony, which closed in 2011.[2] OGNL is developed now as a part of the Apache Commons.
OGNL Technology
[edit | edit source]OGNL began as a way to map associations between front-end components and back-end objects using property names. As these associations gathered more features, Drew Davidson created Key-Value Coding language (KVCL). Luke Blanshard then reimplemented KVCL using ANTLR and started using the name OGNL. The technology was again reimplemented using the Java Compiler Compiler (JavaCC).
OGNL uses Java reflection and introspection to address the Object Graph of the runtime application. This allows the program to change behavior based on the state of the object graph instead of relying on compile time settings. It also allows changes to the object graph.
Projects using OGNL
[edit | edit source]- WebWork and its successor Struts2
- Tapestry (4 and earlier)
- Spring Web Flow
- Apache Click
- MyBatis - SQL mapper framework
- The Thymeleaf - A Java XML/XHTML/HTML5 template engine
- FreeMarker - A Java template engine
OGNL security issues
[edit | edit source]Due to its ability to create or change executable code, OGNL is capable of introducing critical security flaws to any framework that uses it.[citation needed] Multiple Apache Struts 2 versions have been vulnerable to OGNL security flaws.[3] As of October 2017, the recommended version of Struts 2 is 2.5.13.[4] Users are urged to upgrade to the latest version, as older revisions have documented security vulnerabilities — for example, Struts 2 versions 2.3.5 through 2.3.31, and 2.5 through 2.5.10, allow remote attackers to execute arbitrary code.[5] Atlassian Confluence has repeatedly[6][7] been affected by OGNL security issues that allowed arbitrary remote code execution, and required all users to update.
See also
[edit | edit source]Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').
External links
[edit | edit source]- OGNL 3.x maintenance branch
- OGNL 4.x Homepage (Apache)
- Apache Struts CVE-2013-2134 OGNL Expression Injection Vulnerability Archived 2021-05-09 at the Wayback Machine
References
[edit | edit source]- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).