Re: [struts-user] How to encrypt the url?

2011-07-29 Thread Christian Grobmeier
 is logging out to the login screen, so I have to give links like

 http://localhost:8080/UNOT/User/ViewProfile.action?id=1passwd
 =643def90app_login=Login

 So, is there any way to encrypt the url?

 Bad idea. But yes, and it is not a struts issue. So I will ask why can't you 
 use
 a session?

I would like to second that this is a bad idea.

You should sha/md5 your password before sending it. This of course is
client side and you could do that with javascript. You could use this:
http://www.bichlmeier.info/sha256.html

Anyway, people might be able to snif this encrypted password and use
the encrypted version to login. The only benefit is they do not own
the clear password, which might be used for other apps as email.
Therefore you should go to https://







 --
 View this message in context:
 http://struts.1045723.n5.nabble.com/How-to-encrypt-the-url-tp4
 644406p4644406.html
 Sent from the Struts - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org





 --
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 -                                                               -
 - Jason Pyeron                      PD Inc. http://www.pdinc.us -
 - Principal Consultant              10 West 24th Street #100    -
 - +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
 -                                                               -
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 This message is copyright PD Inc, subject to license 20080407P00.




 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org





-- 
http://www.grobmeier.de

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [struts-user] How to encrypt the url?

2011-07-29 Thread Maurizio Cucchiara
If your only requirement is that you can pass parameter only via get,
take into consideration that you can recovery the session content
through the jsessionid get parameter.

You should sha/md5 your password before sending it. This of course is
client side and you could do that with javascript. You could use this:
 http://www.bichlmeier.info/sha256.html

 Anyway, people might be able to snif this encrypted password and use
 the encrypted version to login.

I have been using a similar approach in an iPad application (where the
client side provides something more than the simple javascript), in
order to mitigate this kind of risk I chose to send a time based,
salted hash, according with the challenge response authentication
schema [1]

I think this is a way to complicate your life, and you should do that
only if it is strictly necessary (in my case the requirement was to
remember the user authentication)

[1] http://en.wikipedia.org/wiki/Challenge-response_authentication

--
Maurizio Cucchiara

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Problem with s:checkboxlist, FreeMarker template Error

2011-07-29 Thread Mano Pájaro
Hello list!! I'm having a problema with this tag, I don't know what to do :(
I hope you guys could help me.
As here says http://struts.apache.org/2.2.3/docs/checkboxlist.html I can use
a Map object in the list attribute of a checkboxlist, When i go for it I got
this FreeMarker template error:

FreeMarker template error!


Expression parameters.name is undefined on line 38, column 32 in
template/simple/checkboxlist.ftl.
The problematic instruction:
--
== ${parameters.name?html} [on line 38, column 30 in
template/simple/checkboxlist.ftl]
 in user-directive s.iterator [on line 25, column 5 in
template/simple/checkboxlist.ftl]
 in include /${parameters.templateDir}/simple/checkboxlist.ftl [on line
25, column 1 in template/xhtml/checkboxlist.ftl]
--

Java backtrace for programmers:
--
freemarker.core.InvalidReferenceException: Expression parameters.name is
undefined on line 38, column 32 in template/simple/checkboxlist.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at
freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.visit(Environment.java:299)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.include(Environment.java:1483)
at freemarker.core.Include.accept(Include.java:169)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.UIBean.end(UIBean.java:513)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
at org.apache.jsp.jsp.GuardarAlumnoForm_jsp._jspx_met


Even weirder, when I use a List object (because, i don't know, maybe List
would work), I also get the same error!
I don't know if this is a bug or I am doing something wrong. In the action
class I define a MapInteger,String objected implemented as HashMap, and
ListString as ArrayList, I dont' even know what freemarker is :(
Thank you for your help

-- 
Manolo Pájaro Santander
Ingeniero de Sistemas VIII Semestre (Actual)
Promoviendo el Software Libre
CUSOL-UAC
Linux Registered User # 522026


ERROR [http-8080-Processor24]

2011-07-29 Thread ian11976
Can anyone help me with this error:


ERROR [http-8080-Processor24]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/lps].[action]
invoke- Servlet.service() for servlet action threw exception
java.lang.NumberFormatException
at java.math.BigDecimal.init(Unknown Source)
at java.math.BigDecimal.init(Unknown Source)
at
org.apache.commons.beanutils.converters.BigDecimalConverter.convert(BigDecimalConverter.java:112)
at
org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)
at
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)
at
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:804)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)


--
View this message in context: 
http://struts.1045723.n5.nabble.com/ERROR-http-8080-Processor24-tp4642040p4642040.html
Sent from the Struts - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: ERROR [http-8080-Processor24]

2011-07-29 Thread Paul Benedict
Your string failed converting to a BigDecimal. Likely your form
validation is incorrect or not running at all. See the javadoc on
BigDecimal to determine what are correct formats for the String you
want to convert.

On Thu, Jul 28, 2011 at 5:25 AM, ian11976 ian11...@yahoo.com wrote:
 Can anyone help me with this error:


 ERROR [http-8080-Processor24]
 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/lps].[action]
 invoke- Servlet.service() for servlet action threw exception
 java.lang.NumberFormatException
        at java.math.BigDecimal.init(Unknown Source)
        at java.math.BigDecimal.init(Unknown Source)
        at
 org.apache.commons.beanutils.converters.BigDecimalConverter.convert(BigDecimalConverter.java:112)
        at
 org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)
        at
 org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)
        at
 org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
        at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
        at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
        at
 org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:804)
        at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
        at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at 
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
        at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Unknown Source)


 --
 View this message in context: 
 http://struts.1045723.n5.nabble.com/ERROR-http-8080-Processor24-tp4642040p4642040.html
 Sent from the Struts - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org