Index: openacs-4/packages/cookie-consent/cookie-consent.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cookie-consent/cookie-consent.info,v diff -u -r1.5.2.6 -r1.5.2.7 --- openacs-4/packages/cookie-consent/cookie-consent.info 13 Jul 2023 13:12:31 -0000 1.5.2.6 +++ openacs-4/packages/cookie-consent/cookie-consent.info 24 Jul 2024 16:34:48 -0000 1.5.2.7 @@ -9,28 +9,29 @@ f f - + Gustaf Neumann Cookie Consent Widget based on the free Cookie Consent Library 2021-09-16 MIT License 0 - + - + - + + + min_n_values="1" max_n_values="1" + name="Version" default="3.1.1" + description="Version of the cookie-consent library, e.g.: 3.1.1"/> Index: openacs-4/packages/cookie-consent/tcl/callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cookie-consent/tcl/callback-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/cookie-consent/tcl/callback-procs.tcl 9 Feb 2020 15:34:41 -0000 1.1.2.2 +++ openacs-4/packages/cookie-consent/tcl/callback-procs.tcl 24 Jul 2024 16:34:48 -0000 1.1.2.3 @@ -79,7 +79,43 @@ } } + ad_proc -private after-upgrade { + -from_version_name + -to_version_name + } { + After-upgrade callback. + } { + apm_upgrade_logic \ + -from_version_name $from_version_name \ + -to_version_name $to_version_name \ + -spec { + 0.7 0.8 { + foreach package_id [apm_package_ids_from_key -package_key cookie-consent] { + set old_value [parameter::get -package_id $package_id -parameter Version] + ns_log notice \ + "cookie-conset: after upgrade: check parameter 'Version'" \ + "of package_id $package_id has value '$old_value'" + set new_value $old_value + regsub {cookieconsent2/} $old_value "" new_value + + if {$old_value ne $new_value} { + parameter::set_value \ + -package_id $package_id \ + -parameter Version \ + -value $new_value + + ns_log notice \ + "cookie-conset: after upgrade: parameter 'Version'" \ + "of package_id $package_id" \ + "changed from '$old_value' to '$new_value'" + + } + } + } + } + } + # # Register a "page_plugin" callback for the subsite. In case, this # is used with an OpenACS version earlier than 5.10.0d2, this is Index: openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl,v diff -u -r1.12.2.11 -r1.12.2.12 --- openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl 23 Jul 2024 16:10:50 -0000 1.12.2.11 +++ openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl 24 Jul 2024 16:34:48 -0000 1.12.2.12 @@ -301,8 +301,13 @@ # # Provide paths for loading either via resources or CDN # + # "resourceDir" is the absolute path in the filesystem + # "resourceUrl" is the URL path provided to the request processor + # "versionDir" is the version-specific element both in the + # URL and in the filesystem. + set resourceDir [acs_package_root_dir cookie-consent/www/resources] - set cdn "//cdnjs.cloudflare.com/ajax/libs" + set cdn "//cdnjs.cloudflare.com/ajax/libs/cookieconsent2" # # If the resources are not available locally, these will be @@ -328,6 +333,7 @@ extraFiles {} \ versionCheckURL https://cdnjs.com/libraries/cookieconsent2 \ versionCheckAPI {cdn cdnjs library cookieconsent2 count 5} \ + vulnerabilityCheckURL https://snyk.io/advisor/npm-package/cookieconsent \ installedVersion $version return $result