Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
girishadat opened this issue Jun 27, 2016 · 3 comments
Open

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

girishadat opened this issue Jun 27, 2016 · 3 comments

Comments

@girishadat
Copy link

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.

@girishadat girishadat changed the title Wrong parsing of CWMP method name Wrong parsing of CWMP method name for XML Self Closing Tags Jun 27, 2016
@jarlah
Copy link

jarlah commented May 14, 2018

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

@jarlah
Copy link

jarlah commented Apr 30, 2019

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
Copy link
Owner

mortensimon commented May 2, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants