Shouldn't versions of JS libraries be pinned in Configuration.php and elsewhere? #1765
-
Describe the problem/questionIn, i.e.: https://github.com/PrivateBin/PrivateBin/blob/master/lib/Configuration.php are not pinned to versions. Wouln't this create conflicts, especially but not limited to SRI? Wouldn't it be better to either use a specific version or provide with i.e. "privatebin?1.7.4"? Did you use the FAQ section?
What you did?
What happensNo response What should happenNo response Additional informationNo response Server addressNo response Server OSNo response WebserverNo response PrivateBin versionNo response Browser and versionNo response Local operating system and versionNo response Issue reproducibilityYes, reproducible on https://privatebin.net. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
All JS files are versioned in the templates, as delivered to the visitor - they either have the version as part of the file name or get a cache breaker version of PrivateBin appended as GET parameter (so the visitor will see "js/privatebin.js?1.2.3"). Those 4 files are part of PrivateBins codebase, so their version is the PrivateBin version upon release. Between releases, the SRI hashes should be changed every time one of these files is updated, but we don't consider the file version to be different, as it isn't part of a new release yet. |
Beta Was this translation helpful? Give feedback.
This is exactly how it is already implented and you don't need to change anything to get to see those versions in your installation. This is automatically done by the View class, when it renders the template out:
PrivateBin/lib/View.php
Lines 76 to 78 in 9a29894