refactor: drop legacy rs/jquery + drop resource-server-content overlay#113
Open
bjagg wants to merge 2 commits into
Open
refactor: drop legacy rs/jquery + drop resource-server-content overlay#113bjagg wants to merge 2 commits into
bjagg wants to merge 2 commits into
Conversation
…sJs> Problem: CoursesPortlet stacked three jQuery loads — the bedrock 4.0 from the parent skin, jQuery 1.9.1 + jQuery UI 1.8.13 in resources.xml, and an additional jQuery 1.4.2 in whatIf.jsp. The 1.x line carries known XSS CVEs (CVE-2011-4969, CVE-2012-6708, CVE-2015-9251 for jQuery; CVE-2010-5312, CVE-2012-6662, CVE-2016-7103 for jQuery UI). Separately, every grades*.jsp wrapped its inline JS in <rs:compressJs>, a JSP tag that the resource-server-utils maintainers have already converted to a pass-through (@deprecated; minification moved to esbuild) — the wrapper does nothing and clutters the markup. Goal: bring CoursesPortlet onto the bedrock jQuery 4.0 + jquery-migrate + jquery-ui 1.14.2 (loaded by the parent skin) and remove the dead compressJs wrappers, ahead of retiring the legacy ResourceServingWebapp overlay. Changes: - courses-portlet-webapp/src/main/webapp/resources.xml: drop the /rs/jquery/1.9.1 and /rs/jqueryui/1.8.13 <js resource="true"> lines; add a comment recording the bedrock pin. - courses-portlet-webapp/src/main/webapp/WEB-INF/jsp/degreeprogress/whatIf.jsp: drop the per-page jQuery 1.4.2 <script> tag. The script body's jQuery.noConflict(true) call now operates on the bedrock 4.0 instance and works through jquery-migrate. - courses-portlet-webapp/src/main/webapp/WEB-INF/jsp/{final-grades,mycourses,myuwcourses}/grades*.jsp (6 files): remove the <rs:compressJs>...</rs:compressJs> wrappers around the inline JS. Body content unchanged. Notes: the bundled plugins (jquery.timetable.js, jquery.log.js) use the standard (function($){...})($) IIFE pattern — they keep working on jQuery 4.0 via jquery-migrate. Not runtime-verified in this pass — CoursesPortlet isn't in uPortal-start's overlay set; ships at the next CoursesPortlet release.
ChristianMurphy
approved these changes
May 7, 2026
Contributor
|
I believe a little more needs to happen in order for this portlet to work properly with the resource-server updates: |
Naenyn
requested changes
May 8, 2026
Contributor
Naenyn
left a comment
There was a problem hiding this comment.
Please see my comment here: #113 (comment)
… dead libs) Problem: CoursesPortlet's webapp module declared a runtime <dependency> on the resource-server-content WAR overlay plus a maven-war-plugin <overlay> config that pulled in rs/jquery/1.6.1/ and rs/jqueryui/1.8.13/. The overlay also unpacked the entire rs/* tree of legacy libraries (lodash 4.17.4 with 4 known CVEs, underscore, backbone, modernizr, normalize, plus jquery-plugins) into the WAR for nothing — none of which any source file references after 677110b removed the legacy jquery/jqueryui paths and the <rs:compressJs> wrappers. Goal: drop the entire overlay (dep + maven-war-plugin extract). Required jQuery is loaded by uPortal core's chrome via /resource-server/webjars/jquery/...; CoursesPortlet's source no longer reaches into /CoursesPortlet/rs/... or /ResourceServingWebapp/rs/... Changes: - courses-portlet-webapp/pom.xml: drop the runtime <dependency> on resource-server-content; drop the maven-war-plugin <overlay> config that extracted rs/jquery/1.6.1/ and rs/jqueryui/1.8.13/. resource-server-utils is unchanged (still provides the rs:* taglibs used elsewhere in the parent pom hierarchy). - pom.xml (parent): drop the now-orphaned <dependencyManagement> entry for resource-server-content; no submodule pulls it any more. Notes: paired with 677110b which did the source-side path swap + <rs:compressJs> retirement. WAR size shrinks meaningfully; reviewers can verify with `unzip -l courses-portlet-webapp/target/*.war | grep 'rs/'` returning empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three commits — release-plugin commits from a prior 2.1.1 release cycle that didn't get pushed, plus the actual work:
da39d63— release plugin prep for 2.1.1 (already-released)0453e6f— release plugin post-2.1.1 SNAPSHOT bump677110b(prior) — drop legacy rs/jquery loads + retire<rs:compressJs>taglib wrappers; the source-side consolidation.9df8b28(new) — drop theresource-server-contentWAR overlay (dep + maven-war-plugin extract). The overlay was unpacking lodash 4.17.4 (4 CVEs), underscore, backbone, modernizr, normalize, and jquery-plugins into the WAR for nothing, plus an explicit extract ofrs/jquery/1.6.1/andrs/jqueryui/1.8.13/— none referenced after677110b.Why this is safe
grep -rEn '/CoursesPortlet/rs/' courses-portlet-webapp/src/returns no matches after677110b./resource-server/webjars/jquery/....Test plan
mvn clean install -DskipTestsbuilds (verified locally on Java 11)rs/directory (verified)/p/courses/?pCm=viewand admin views render without missing-resource errors