Comments (10)
Hi Youssef,
we have detected the source of error: InitListener is executed before CharacterEncodingFilter and we read some parameter from the request. This causes the new encoding (UTF-8) does not apply.
We are working to find a solution.
Thanks for the complete information
from hdiv.
Hi Gotzon,
OK thank's for the diagnostic !
So, we'll wait your solution :-)
Regards,
from hdiv.
I fixed the problem with this dirty patch :
public class InitListenerFixEncoding extends InitListener {
private static final Logger LOGGER= LoggerFactory.getLogger(InitListenerFixEncoding.class);
@OverRide
public void requestInitialized(ServletRequestEvent sre) {
HttpServletRequest request = (HttpServletRequest) sre.getServletRequest();
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
LOGGER.debug("Encoding UTF-8 is not supported !",e);
}
super.requestInitialized(sre);
}
}
But ideally InitListner must be executed after CharacterEncodingFilter !
Regards,
Youssef
from hdiv.
Thanks Youssef, your solution worked for me too.
from hdiv.
Issue resolved in trunk with this commit: 3cacefb
Now request is not 'touched' in InitListener and CharacterEncodingFilter works correctly.
Thanks for your help!
from hdiv.
Cool Thanks !! we're waiting for the release ;o)
from hdiv.
Hi all,
I had the same problem, then I applied your patch and initially it seemed to work but now I have a new problem: when a special character is sent trough an hidden field, HDIV detects it to be changed (while it is not).
Here is mi code:
in the jsp:
<form:hidden path="nomeAzienda" />
the value of "nomeAzienda" is è-test and this is hdiv log message
20130318 095738 INFO org.hdiv.logs.Logger INVALID_PARAMETER_VALUE;/myapp/pratiche/savempart.html;nomeAzienda;è-test;0:0:0:0:0:0:0:1;0:0:0:0:0:0:0:1;user
Did you find a solution to this problem?
Thanks a lot
Massimo
from hdiv.
Hi Massimo,
resolved on the trunk: 2134eda
Thank you!
If you cant update to the last snapshot of HDIV you can disable content escaping in the hidden field as a temporal fix:
<form:hidden path="username" htmlEscape="false"></form:hidden>
from hdiv.
Thanks a lot! When do you think the new release will be available?
from hdiv.
Hi,
Hdiv 2.1.4 release is public on Maven repositories: http://search.maven.org/#artifactdetails%7Corg.hdiv%7Chdiv%7C2.1.4%7Cpom
Regards
from hdiv.
Related Issues (20)
- File Upload question
- no produce a _HVID_STATE_ HOT 2
- JSTL issue related to hdiv on Jboss7.1
- Error creating bean with name 'requestDataValueProcessor'
- In jsp page I have a list which have an Enum filed in it's object and only first index has the Enum value HOT 1
- Hi, i use ":hdiv:1.0-RC2" version after updating to grails 2.5.6 it doesn't call any pages.
- Dependency org.springframework.security:spring-security-web, leading to CVE problem HOT 1
- Access Control Bypass Vulnerability when forwarding or including via RequestDispatcher
- HDIV is giving INVALID cookie when a page is opening with an image HOT 1
- Restricting the validation to a set of URL HOT 7
- HDIV 3.0.0 execution strategies HOT 2
- HDIV Schema Locations have disappeared from your website? HOT 3
- Getting cannot call getWriter() after getOutputStream error probably because of HDIV validation HOT 2
- HDIV 3.2.0 error INVALID_COOKIE when domain is set HOT 1
- JSTL issue on Wildfly 11 / JBoss EAP 7.1 HOT 3
- HDIV parameter does not exist HOT 11
- Spring+Thymeleaf+Jquery+HDIV HOT 4
- url exclusion not working with spring boot HOT 2
- missing HDIV state hidden param in spring 4.3.13 form HOT 2
- Which spring mvc version does hdiv support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hdiv.