-
Notifications
You must be signed in to change notification settings - Fork 138
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
Escape for slashes in path #414
Comments
@danroot we have not exposed IPahHandler as DI service in RESTier yet, the workaround is not simple as we do in Web Api now. To workaround this one,
Let me know if you have more questions, in the meanwhile, I create #415 to make this replacement same as other service, and will be delivered in next release. |
This sample does not work, stay tuned. |
Per comments from web api team, IIS will escape back slash and this is not configurable. A temp solution with end to end test case is added with #415, refer to it for detail on how to enable , but back slash and slash is not recommended used in the key as Web API suggests, as there may become a security hole. Also for permanent solution, it is tracked with #421 , key value will be as query options and refer to URL via key alias. I close this issue now, any questions or comments, let us know. |
With a path such as this: /service/Users('Some%5Cuser') a 404 is always returned. What is the best way to fix this or override the issue within Restier?
Assemblies affected
RESTier 0.4.0-rc2
Reproduce steps
Build a service on a EF context with a table with string key
Ensure a record with key 'Some\user'
browse to /service/Users('Some%5Cuser')
Expected result
Expect a return value.
Actual result
404
Additional details
This is due to a "by design" behavior of Web API OData. An explanation and a workaround is provided in this sample:
https://github.com/OData/ODataSamples/tree/master/WebApi/v4/ODataPathAndSlashEscapeSample
However, I'm unclear how to implement this in Restier.
The text was updated successfully, but these errors were encountered: