You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pyodata does not correctly escape the path when an entity key contains a /. For example SAP's OData service for Software Components retrieves an SC called ZFOO with the URL:
Looking at the pyodata code I can see that EntityGetRequest.get_path() is calling quote() which by default considers safe='/'. It seems to me it should override safe='' so that / characters are escaped. I am new to the pyodata code so I'm not sure if this issue might also lurk on operations other than EntityGetRequest. I'll appreciate any feedback or expansion on my analysis.
The text was updated successfully, but these errors were encountered:
This is interesting case, so far we did not encounter such interesting entity name.I tried to contact you first using internal SAP channels, since there was not mentioned of what service this is or $metadata document provided. But with the PR it is clearer what the intentions are.
Just to confirm, it is a case of having in metadata something like <EntityType Name="BAZ/FOO">. Correct?
I have first wanted to check if this is a case of some specific odata service(so it should be under /vendor) or generic odata protocol. Odata v2 IMHO does not specify this exactly, resp. I was not able to find it on odata.org. But in Odata V4 specification is referenced RFC 3987 - Internationalized Resource Identifiers (IRIs) for Entity ID and v4 vs v2 is mostly backward compatible. This is definitely not in the list of breaking changes for V4, so I would assume it is valid for generic odata V2as well.
Run into this:
The entity-id MUST be an IRI as defined in [RFC3987] and MAY be expressed in payloads, headers, and URLs as a relative reference as appropriate.
Greetings,
pyodata does not correctly escape the path when an entity key contains a
/
. For example SAP's OData service for Software Components retrieves an SC calledZFOO
with the URL:But if I try to get an SC called
/BAZ/FOO
the URL is malformed as:but the
/
characters ought to be escaped asLooking at the pyodata code I can see that
EntityGetRequest.get_path()
is callingquote()
which by default considerssafe='/'
. It seems to me it should overridesafe=''
so that/
characters are escaped. I am new to the pyodata code so I'm not sure if this issue might also lurk on operations other thanEntityGetRequest
. I'll appreciate any feedback or expansion on my analysis.The text was updated successfully, but these errors were encountered: