Skip to content

fix: bump jquery-ui to v1.13.2 to fix multiple CVEs - #2477

Merged
cderv merged 8 commits into
rstudio:mainfrom
daschnerm:bump-jqueryui
May 23, 2023
Merged

cderv merged 8 commits into
rstudio:mainfrom
daschnerm:bump-jqueryui

Conversation

@daschnerm

@daschnerm daschnerm commented Apr 21, 2023 •

Copy link
Copy Markdown
Contributor

What

  • bump jquery-ui to v1.13.2 to fix CVE-2016-7103
  • I've tested the floating ToC, as well as the normal ToC feature still works without any issues.

Why

#2405

@cderv cderv linked an issue Apr 21, 2023 that may be closed by this pull request
@cderv cderv added the next to consider for next release label Apr 21, 2023

@cderv cderv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot.

I left a comment. I wonder if we should have exactly the same component.

Otherwise, I was wondering if we should sync with the version in shiny. What do you think ?
I did compare with this script executed on your branch

# This script aims to update and sync jquery-ui dependency with the one in shiny

rmd <- "inst/rmd/h/jqueryui/"

shiny <- "https://github.com/rstudio/shiny/archive/refs/heads/main.zip"

temp_zip <- tempfile(fileext = ".zip")
xfun::download_file(shiny, temp_zip, mode = "wb")

dir.create(temp_shiny <- tempfile("shiny"))

unzip(temp_zip, exdir = temp_shiny)

jqueryui <- file.path(temp_shiny, "shiny-main", "inst", "www", "shared", "jqueryui")

unlink(rmd, recursive = TRUE)

file.copy(jqueryui, dirname(rmd), overwrite = TRUE, recursive = TRUE)

unlink(temp_shiny, recursive = TRUE)
unlink(temp_zip, recursive = TRUE)

It seems there are some differences probably due to the components includes.

Comment thread inst/rmd/h/jqueryui/jquery-ui.css Resolved
@daschnerm

daschnerm commented Apr 24, 2023 •

Copy link
Copy Markdown
Contributor Author

This is the diff between jquery-ui components in shiny and r-markdown:

diff shiny-js-sorted.txt rmarkdown-js-sorted.txt 
0a1,2
> data.js
> disable-selection.js
21a24
> position.js
24a28
> widget.js
30d33
< widgets/datepicker.js

which matches with the description from README.md from r-markdown:

It includes all components except the datepicker, because it conflicts with
bootstrap-datepicker that is packaged with Shiny.

However, the conflict between bootstrap-datepicker and jquery-ui datepicker was resolved in rstudio/shiny#1374, which is why I guess shiny includes the datepicker from jquery-ui again.

@daschnerm

Copy link
Copy Markdown
Contributor Author

@cderv I've updated the PR and pulled in thejquery-ui version from Shiny.

@cderv cderv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you.

I'll add an updating script and merge

@cderv
cderv merged commit 151de7e into rstudio:main May 23, 2023
j-magnolia pushed a commit to j-magnolia/rmarkdown that referenced this pull request Aug 16, 2023
* rstudio/main:
  start the next version
  CRAN release v2.24
  shinyrmd: Safer dependency extraction from pre-rendered HTML (rstudio#2500)
  quote the version number per CRAN's request
  Add output_format_dependency() (rstudio#2462)
  file_scope is now correctly merged when creating output_format (rstudio#2488)
  Correctly run some tests only on CI
  start the next version
  CRAN release v2.23
  remove broken links
  suggest cleanrmd for e499bf7
  add news
  comparing version numbers with numbers is no longer allowed: https://bugs.r-project.org/show_bug.cgi?id=18548
  `find_external_resources` works with custom format using `theme` (rstudio#2494)
  start the next version
  CRAN release v2.22
  S3 generic/method consistency
  Change the code-folding button text from "Code" to "Show" (rstudio#2489)
  fix: bump jquery-ui to v1.13.2 to fix multiple CVEs (rstudio#2477)
  detecting external resources needs to consider css argument (rstudio#2486)
j-magnolia pushed a commit to j-magnolia/rmarkdown that referenced this pull request Aug 16, 2023
Merge remote-tracking branch 'rstudio/main' into jg-devel

# By Yihui Xie (13) and others
# Via Yihui Xie
* rstudio/main:
  start the next version
  CRAN release v2.24
  shinyrmd: Safer dependency extraction from pre-rendered HTML (rstudio#2500)
  quote the version number per CRAN's request
  Add output_format_dependency() (rstudio#2462)
  file_scope is now correctly merged when creating output_format (rstudio#2488)
  Correctly run some tests only on CI
  start the next version
  CRAN release v2.23
  remove broken links
  suggest cleanrmd for e499bf7
  add news
  comparing version numbers with numbers is no longer allowed: https://bugs.r-project.org/show_bug.cgi?id=18548
  `find_external_resources` works with custom format using `theme` (rstudio#2494)
  start the next version
  CRAN release v2.22
  S3 generic/method consistency
  Change the code-folding button text from "Code" to "Show" (rstudio#2489)
  fix: bump jquery-ui to v1.13.2 to fix multiple CVEs (rstudio#2477)
  detecting external resources needs to consider css argument (rstudio#2486)

# Conflicts:
#	DESCRIPTION
j-magnolia pushed a commit to j-magnolia/rmarkdown that referenced this pull request Aug 16, 2023
* jg-devel: (21 commits)
  Updated NEWS. Patched `merge_output_format_dependency` to ensure that named elements remain in the correct order.
  start the next version
  CRAN release v2.24
  shinyrmd: Safer dependency extraction from pre-rendered HTML (rstudio#2500)
  quote the version number per CRAN's request
  Add output_format_dependency() (rstudio#2462)
  file_scope is now correctly merged when creating output_format (rstudio#2488)
  Correctly run some tests only on CI
  start the next version
  CRAN release v2.23
  remove broken links
  suggest cleanrmd for e499bf7
  add news
  comparing version numbers with numbers is no longer allowed: https://bugs.r-project.org/show_bug.cgi?id=18548
  `find_external_resources` works with custom format using `theme` (rstudio#2494)
  start the next version
  CRAN release v2.22
  S3 generic/method consistency
  Change the code-folding button text from "Code" to "Show" (rstudio#2489)
  fix: bump jquery-ui to v1.13.2 to fix multiple CVEs (rstudio#2477)
  ...
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

next to consider for next release

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Update jquery-ui to latest version to mitigate vulnerabilities

2 participants