mortensimon / tr069

version.txt
MIT License
36 stars 27 forks source link

Wrong parsing of CWMP method name for XML Self Closing Tags #4

Open girishadat opened 8 years ago

girishadat commented 8 years ago

If the CWMP XML tag is self closing without a space before /, then the '/' character is also considered in the method name.

E.g.<cwmp:GetParameterNamesResponse/>could be taking "GetParameterNamesResponse/" as the method name. The last character / should be excluded.

2016-06-23 19:18:01.420 ERROR  xxxxxUnit                           An error ocurred: Could not process HTTP-request (from TR-069 client)
class com.owera.xaps.tr069.UnknownMethodException:The method GetParameterNamesResponse/ was not not recognized by the server.
    com.owera.xaps.tr069.methods.HTTPRequestProcessor.processRequest(HTTPRequestProcessor.java:477)
    com.owera.xaps.tr069.Provisioning.doPost(Provisioning.java:210)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Thread.java:745)

Could be solved by making XML parsing of the input, instead of raw String operations. Will involve in the fixing and commit if time permits.

jarlah commented 6 years ago

fixed in latest release candiate of rebooted project located at https://github.com/freeacs/freeacs if anyone wonders. https://github.com/freeacs/freeacs

jarlah commented 5 years ago

Just mentioning that this problem has been fixed once and for all. I have made several improvements in the last months, one of them being getting rid of all regex ugly stuff code to retrieve for example cwmp methods. Now the cwmp method is found in a future proof, type safe and functional manner. TLDR; it should just work.

New release at https://github.com/freeacs/freeacs/releases/tag/v3.0-RC1

I have moved away from deb and rpm files, so the release is a distribution zip of multiple zips. Each module contains a start script, jar files, configuration etc.

mortensimon commented 5 years ago

Artig å se at du jobber videre, håper du lykkes!

mvh Morten S

tir. 30. apr. 2019 kl. 19:49 skrev Jarl André Hübenthal < notifications@github.com>:

Just mentioning that this problem has been fixed once and for all. I have made several improvements in the last months, one of them being getting rid of all regex ugly stuff code to retrieve for example cwmp methods. Now the cwmp method is found in a future proof, type safe and functional manner. TLDR; it should just work.

New release at https://github.com/freeacs/freeacs/releases/tag/v3.0-RC1

I have moved away from deb and rpm files, so the release is a distribution zip of multiple zips. Each module contains a start script, jar files, configuration etc.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mortensimon/tr069/issues/4#issuecomment-488049230, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLPTRZXSO4FTZYHRG33KWDPTCBCJANCNFSM4CH3JIBQ .