Incorrect escaping of path
@phanak-sap đang làm issue này rồi.
Từ ngày 20/9/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 268
- Fork
- 100
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SAP/python-pyodata
-
chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SAP/python-pyodata#304 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
SAP/python-pyodata#108 ·
-
chore
SAP/python-pyodata#302 · 1 người được giao ·
-
question
SAP/python-pyodata#294 · 1 bình luận · 1 người được giao ·
-
Chaining FilterExpressions Đang mởbug
SAP/python-pyodata#280 · 13 bình luận · 1 người được giao ·
Tất cả issue của SAP/python-pyodata
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100