Browse Source

Merge remote-tracking branch 'upstream/master' into copy_button_is_hidden

# Conflicts:
#	lib/Configuration.php
Ribas160 2 months ago
parent
commit
ca23d88cd9
4 changed files with 170 additions and 236 deletions
  1. 165 232
      js/package-lock.json
  2. 2 1
      js/package.json
  3. 2 2
      js/privatebin.js
  4. 1 1
      lib/Configuration.php

File diff suppressed because it is too large
+ 165 - 232
js/package-lock.json


+ 2 - 1
js/package.json

@@ -9,9 +9,10 @@
   "devDependencies": {
     "@peculiar/webcrypto": "^1.5.0",
     "eslint": "^9.37.0",
-    "jsdom": "^26.0.0",
+    "jsdom": "^26.1.0",
     "jsdom-global": "^3.0.2",
     "jsverify": "^0.8.3",
+    "mime-types": "^3.0.2",
     "mocha": "^11.7.5",
     "nyc": "^17.1.0"
   },

+ 2 - 2
js/privatebin.js

@@ -3075,7 +3075,7 @@ jQuery.PrivateBin = (function($) {
          */
         me.removeAttachmentData = function()
         {
-            files = undefined;
+            files = [];
             attachmentsData = [];
         };
 
@@ -5231,7 +5231,7 @@ jQuery.PrivateBin = (function($) {
                 };
             if (attachmentsData.length) {
                 cipherMessage['attachment'] = attachmentsData;
-                cipherMessage['attachment_name'] = AttachmentViewer.getFiles()?.map((fileInfo => fileInfo.name)) ?? [];
+                cipherMessage['attachment_name'] = AttachmentViewer.getFiles().map(fileInfo => fileInfo.name);
             } else if (AttachmentViewer.hasAttachment()) {
                 // fall back to cloned part
                 let attachments = AttachmentViewer.getAttachments();

+ 1 - 1
lib/Configuration.php

@@ -122,7 +122,7 @@ class Configuration
             'js/kjua-0.10.0.js'      => 'sha512-BYj4xggowR7QD150VLSTRlzH62YPfhpIM+b/1EUEr7RQpdWAGKulxWnOvjFx1FUlba4m6ihpNYuQab51H6XlYg==',
             'js/legacy.js'           => 'sha512-RQEo1hxpNc37i+jz/D9/JiAZhG8GFx3+SNxjYnI7jUgirDIqrCSj6QPAAZeaidditcWzsJ3jxfEj5lVm7ZwTRQ==',
             'js/prettify.js'         => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==',
-            'js/privatebin.js'       => 'sha512-sAsV518Wu3dHcu1LmidhCeB4XLcHXB4epTbyOrOSAlqp1pG4Pl1zJucgtyfg5bBxaXj1LMACGYX6CxLgLvZqjg==',
+            'js/privatebin.js'       => 'sha512-rWEJ002jppQ4PYnFh8aXg67ZHiKWLz9CRh+VS6VQJ6IfBFb1vZPbgkdWtidT688Y3n/IjIadhvdR6dIpTvdm2A==',
             'js/purify-3.4.1.js'     => 'sha512-280a/Vb6fVFsYaeRrkuDp4EDmdYlt2XS+dlDEO/U9qljPrAraA2bIzHTNmP+9dpwPDDwTML+RS+h5iaagPwTzA==',
             'js/showdown-2.1.0.js'   => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',
             'js/zlib-1.3.2.js'       => 'sha512-RAhJgxg9siMIA8ky4c10Rc2zUgnK80olHB8Tt1IOYWY4Eh1WmrviQkDn+sgBlb38ZHq3tzufGC41kP360gmosQ==',

Some files were not shown because too many files changed in this diff