OWASP / OWASP/owasp-java-encoder
Fix JPMS dependency reads in the JSP, Jakarta, and ESAPI adapters
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 541
- Fork
- 122
- Merge trung bình
- 9 giờ 9 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
Follow-up to #90 (reviewed at 31588e1). This tracks work intentionally kept separate from the modernization PR.
Problem and evidence
The explicit descriptors in jsp/src/main/java9/module-info.java, jakarta/src/main/java9/module-info.java, and esapi/src/main/java9/module-info.java require only owasp.encoder. They do not declare reads for their external API dependencies.
Consumer execution on JDK 17 reproduced:
- Loading
org.owasp.encoder.tag.ForHtmlTagfrom the JSP module fails withIllegalAccessError:owasp.encoder.jspdoes not readjavax.servlet.jsp.api. - The equivalent Jakarta consumer fails because
owasp.encoder.jakartadoes not readjakarta.servlet.jsp. - Calling
ESAPIEncoder.getInstance()with the adapter on the module path and ESAPI on the classpath fails because the adapter does not read the unnamed module.
The same failures occur with published 1.4.0. These are pre-existing issues, not regressions introduced by #90. Merely running jar --describe-module does not exercise these linkage failures.
Acceptance criteria
- Determine and document supported module-path dependency arrangements and API versions for each adapter.
- Correct descriptors, including transitive readability where required by exposed public APIs; use real dependency module names verified against the supported artifacts.
- Add isolated named-module consumers that instantiate/use JSP and Jakarta tags and call the ESAPI adapter. Test the two JSP variants separately because they share a package name.
- Positive tests work without broad
--add-readsor--add-opensworkarounds. - Retain classpath/container behavior, provided dependency scopes, existing public APIs, Java 8 base bytecode, published automatic-module names, explicit module identities, and OSGi metadata.
Related historical module support discussion: #66.
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
Bắt đầu với ba descriptor Java 9 trong jsp/src/main/java9/module-info.java, jakarta/src/main/java9/module-info.java và esapi/src/main/java9/module-info.java, sau đó tái hiện các lỗi của consumer JDK 17 được mô tả trong issue. Xác minh các cách sắp xếp dependency và tên module được hỗ trợ, thêm các consumer Named-Module độc lập cho cả hai biến thể JSP và ESAPI, đồng thời xác nhận các kiểm thử module-path thành công mà không dùng các workaround read hoặc open trên diện rộng, trong khi vẫn giữ nguyên hành vi của classpath và metadata đã phát hành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- build-system, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100