OFBiz attack personal experience of the wonderful problem summary.

Source: Internet
Author: User

When I do return order generation, because it is convenient to control the Java class method to invoke service service can give prompt message, so we have created a new Java class, and then go to request request again, the following is the Java class code

1  Public StaticString Confirmreturnorder (httpservletrequest request,2 httpservletresponse Response) {3String responsestring = "Error";4         Try {5responsestring = eventfactory.runrequestevent (Request, Response, "Makequickreturn");6}Catch(eventhandlerexception e) {7Debug.logerror (E, "Error creating return Order", module);8         }9         return"Success";Ten}
View Code

It then calls the Makequickreturn request, which calls the service directly.

1 <request-map uri= "Makequickreturn" >2         <security https= "true" auth= "true"/>3          <event type= "Service-multi" invoke= "Createreturnanditemoradjustment"/>4         < Response name= "Success" type= "Request-redirect-noparam" value= "Findreturnorder" ></response>5         <response name= "error" type= "View-last"/>6     </request-map>
View Code

Control requests the wording inside,

1<request-map uri= "Confirmreturnorder" >2<security https= "false" auth= "true"/>3<event type= "java" invoke= "Confirmreturnorder" path= "com.brains.order.ReturnOrderEvents" ></event>4<response name= "Success" type= "Request-redirect-noparam" value= "Findreturnorder" ></response>5<response name= "error" type= "View-last"/>6</request-map>7<request-map uri= "Makequickreturn" >8<security https= "true" auth= "true"/>9<event type= "Service-multi" invoke= "Createreturnanditemoradjustment"/>Ten<response name= "Success" type= "Request-redirect-noparam" value= "Findreturnorder" ></response> One<response name= "error" type= "View-last"/> A</request-map>
View Code

The first analysis, is in the Confirmreturnorder control inside the call Makequickreturn this request, so the final return of the view is sure to go confirmreturnorder return the request.

But even if I response inside the two request, the redirect will be returned in the redirected list, with the returned parameters (invoking the service-generated Returnid).

Finally, under the guidance of the project manager, it is known that the response returned with the Java class will encapsulate the parameters returned by the called Service service in attributes, so inside the page, the parameters Change to Requestparameters (because the parameters contains attributes and parameters two parameters)

OFBiz attack on personal experience of the wonderful problem summary.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.