How to upgrade jQuery from 1.1 to 3.1 and above from inside the R packages?

Viewed 31

What I want to do

I am building R Shiny application which is using R packages like leaflet, profvis, ggvis and colourpicker which have jquery files of version lesser than 3.1 inside the R package, and I want to upgrade all jQuery files to 3.1 and above.

Why do I want to upgrade?

There are security issues in older versions of jquery: jQuery 3.0.0-rc.1 is vulnerable to Denial of Service (DoS) due to removing a logic that lowercased attribute names. Any attribute getter using a mixed-cased name for boolean attributes goes into an infinite recursion, exceeding the stack call limit.

Where is jQuery located ?

The jQuery is located inside the R packages :

  1. /R/site-library/leaflet/htmlwidgets/lib/jquery/jquery.min.js
  2. /R/site-library/profvis/htmlwidgets/lib/jquery/jquery.min.js
  3. /R/site-library/ggvis/www/lib/jquery/jquery.js
  4. /R/site-library/colourpicker/htmlwidgets/lib/jquery/jquery.min.js

I tried to find the latest versions of R packages to check if they use the new jQuery versions like the r-shiny package has recently upgraded to new jQuery versions but found that the jQuery is not updated for the most of the packages.

I have these questions:

  • How to upgrade these jQuery files to latest versions ?
  • Will the jQuery upgrade affect the R packages ?
  • If yes, how to upgrade jQuery without affecting the R package ?
  • Alternatively, is there any way to rebuild R packages using the new jQuery?

Thank you for your time!

0 Answers
Related