Menu

#1305 Wrong implementation of WS-Discovery on checking the request type

v1.0 (example)
closed-invalid
None
5
2023-03-21
2022-08-18
No

https://docs.oasis-open.org/ws-dd/discovery/1.1/wsdd-discovery-1.1-spec.html

In WS-Discovery, it states the <a:action> indicates the request type. (e.g. Hello, Bye, Probe, etc)
For example,
<a:action ...="">
http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Hello
</a:action></a:action>

But in wsddapi.c , it is checking other tags to understand the request type.
The implementation is wrong.

SOAP_FMAC1
int
SOAP_FMAC2
soap_wsdd_serve_request(struct soap soap)
{
soap_peek_element(soap);
if (!soap_match_tag(soap, soap->tag, "wsdd:Hello"))
return soap_wsdd_servewsdd_Hello(soap);
if (!soap_match_tag(soap, soap->tag, "wsdd:Bye"))
return soap_wsdd_serve
_wsdd__Bye(soap);
if (!soap_match_tag(soap, soap->tag, "wsdd:Probe"))
return soap_wsdd_servewsdd_Probe(soap);
if (!soap_match_tag(soap, soap->tag, "wsdd:ProbeMatches"))
return soap_wsdd_serve
_wsdd__ProbeMatches(soap);
if (!soap_match_tag(soap, soap->tag, "wsdd:Resolve"))
return soap_wsdd_servewsdd_Resolve(soap);
if (!soap_match_tag(soap, soap->tag, "wsdd:ResolveMatches"))
return soap_wsdd_serve
_wsdd__ResolveMatches(soap);
soap->error = SOAP_NO_METHOD;
/
close socket unless soap->keep_alive == 1 */
return soap_closesock(soap);
}

Discussion

  • Robert van Engelen

    Please read the gsoap WS-Discover documentation. It states that you must use soapcpp2 with option -a to match actions instead of tags.

     
  • Robert van Engelen

    • status: open --> closed-invalid
     

Log in to post a comment.