nodeSolidServer / nodeSolidServer/node-solid-server
HostURI is set to https even if not using https
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.8k
- Fork
- 308
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Tim Berners-Lee @timbl 10:21
There is a bug in NSS where it assumes somewhere that it is running as https: and not http:. when making the base URI of a document for parsing.
targetKB.statementsMatching(st.subject, st.predicate, st.object, target)
[]
targetKB.statementsMatching(st.subject, st.predicate, st.object, null)
[]
targetKB.statementsMatching(null, st.predicate, st.object, target)
(2) [Statement, Statement]
targetKB.statementsMatching(null, st.predicate, st.object, target)[0].subject.uri
"https://localhost:3080/timbl/Public/Test/2018/Cascade%20test/SFO%20LHR/Test%20long%20chat/index.ttl#SharedPreferences"
targetKB.statementsMatching(null, st.predicate, st.object, target)[1].subject.uri
"https://localhost:3080/timbl/Public/Test/2018/Cascade%20test/SFO%20LHR/Test%20long%20chat/index.ttl#id1527249837545"
st.subject
NamedNode {termType: "NamedNode", value: "http://localhost:3080/timbl/Public/Test/2018/Casca…HR/Test%20long%20chat/index.ttl#SharedPreferences"}
st.subject.uri
"http://localhost:3080/timbl/Public/Test/2018/Cascade%20test/SFO%20LHR/Test%20long%20chat/index.ttl#SharedPreferences"
That is debug console output in the PATCH handler
A statement in the store jas a subject which starts https: instead of http: — as a result the PATCH fails 409 as it can’t find the triple to delete it.
Yes @RubenVerborgh this is an example of where having a single mapping place from filename to URI and back may have avoided this.
Ruben Verborgh @RubenVerborgh 10:29
Aha! We had a very similar bug earlier. On the road now, but will check later today.
Do you have more details?
Tim Berners-Lee @timbl 10:34
The above is a deep dive to where the issue shows itself..in fact you can see it in he log
solid:handlers PATCH -- Reading https://localhost:3080/timbl/Public/Test/2018/Cascade%20test/SFO%20LH
bzzzzt thats wrong
There is a strange line
target.uri = utils.getBaseUri(req) + req.originalUrl
locals.host.serverUri : "https://localhost:8443"
That is wrong
Maybe from here: https://github.com/solid/node-solid-server/blob/master/config/defaults.js#L12
Maybe that is where the https: originates from
Tim Berners-Lee @timbl 11:14
I guess the fault is basically in https://github.com/solid/node-solid-server/blob/master/lib/models/solid-host.js
_
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.
Hướng nghiên cứu
Đọc lib/models/solid-host.js và config/defaults.js, sau đó theo dõi utils.getBaseUri(req) qua PATCH handler. So sánh URL của request và locals.host.serverUri với URI được lưu trong các statement đã được phân tích. Hoàn tất khi các request không dùng HTTPS giữ nguyên scheme http và PATCH có thể tìm thấy triple cần xóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100