Incorrect escaping of path
@phanak-sap 已经在做这个了。
开始于 2024年9月20日。
评估
这个 Issue 还没有评估数据。
描述
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 called ZFOO with the URL:
https://hostname/sap/opu/odata/sap/A4C_A2G_GHA_SC/SoftwareComponents%28%27ZFOO%27%29
But if I try to get an SC called /BAZ/FOO the URL is malformed as:
https://hostname/sap/opu/odata/sap/A4C_A2G_GHA_SC/SoftwareComponents%28%27/BAZ/FOO%27%29
but the / characters ought to be escaped as
https://hostname/sap/opu/odata/sap/A4C_A2G_GHA_SC/SoftwareComponents%28%27%2FBAZ%2FFOO%27%29
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.
- 主要语言
- Python
- 星标
- 268
- 派生
- 100
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SAP/python-pyodata 的其他 Issue
-
chore
难度 2/5 1-3 小时 新手友好度 78/100
SAP/python-pyodata#304 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
SAP/python-pyodata#108 ·
-
chore
SAP/python-pyodata#302 · 已指派 1 人 ·
-
question
SAP/python-pyodata#294 · 1 条评论 · 已指派 1 人 ·
-
bug
SAP/python-pyodata#280 · 13 条评论 · 已指派 1 人 ·
查看 SAP/python-pyodata 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 88/100
use-agent-os/agent-os#3314 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
BasedHardware/omi#15662 · 1 条评论 ·
-
documentation help wanted
难度 2/5 1-3 小时 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 62/100
AiursoftWeb/AnduinOS-2#19 ·