Merge branch 'master' into keyboard-trap

This commit is contained in:
El RIDO 2025-01-05 07:23:41 +01:00
commit 4076a831eb
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
16 changed files with 47 additions and 35 deletions

View File

@ -22,11 +22,12 @@ jobs:
continue-on-error: "${{ matrix.experimental }}"
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
experimental: [false]
include:
- php-versions: '8.4' # development release, things can break
experimental: true
# uncomment this to start testing on development release
# include:
# - php-versions: '8.5' # development release, things can break
# experimental: true
env:
extensions: gd, sqlite3
extensions-cache-key-name: phpextensions

View File

@ -6,7 +6,8 @@
* CHANGED: Switched to WASM streaming and replace unsafe-eval with wasm-unsafe-eval CSP declaration (#1464), requires webserver to have `application/wasm` MIME type configured.
* CHANGED: Replaced usage of strpos with str_starts_with & str_contains (#1373)
* CHANGED: Added polyfill libraries for ctype, str_starts_with & str_contains functions (#1476)
* CHANGED: Upgrading libraries to: cloud-storage 1.44.0, aws-sdk-php 3.331.0
* CHANGED: Turned paste delete link into a button (#266)
* CHANGED: Upgrading libraries to: DOMpurify 3.2.3, cloud-storage 1.45.0, aws-sdk-php 3.336.2
## 1.7.5 (2024-11-16)
* ADDED: Allow non persistent SQL connections, if configured (#1394)

View File

@ -32,8 +32,8 @@
"yzalis/identicon": "2.0.0"
},
"suggest" : {
"google/cloud-storage" : "1.44.0",
"aws/aws-sdk-php" : "3.331.0"
"google/cloud-storage" : "1.45.0",
"aws/aws-sdk-php" : "3.336.2"
},
"require-dev" : {
"phpunit/phpunit" : "^9"

View File

@ -221,10 +221,10 @@
"Error compressing paste, due to missing WebAssembly support.": "Fehler beim Komprimieren des Textes, da WebAssembly-Unterstützung fehlt.",
"Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen.",
"Start over": "Neuen Text erstellen",
"Paste copied to clipboard": "Paste copied to clipboard",
"To copy paste press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>": "To copy paste press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>",
"Copy link": "Copy link",
"Link copied to clipboard": "Link copied to clipboard",
"Paste copied to clipboard": "Text wurde in Zwischenablage kopiert.",
"To copy paste press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>": "Zum Kopieren des Textes drücken Sie die Kopieren-Schaltfläche oder verwenden Sie die Tastenkombination <kbd>Strg</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>",
"Copy link": "Verknüpfung kopieren",
"Link copied to clipboard": "Verknüpfung wurde in die Zwischenablage kopiert.",
"Paste text": "Paste text",
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)"
}

View File

@ -223,7 +223,7 @@
"Start over": "Recommencer",
"Paste copied to clipboard": "Paste copied to clipboard",
"To copy paste press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>": "To copy paste press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>",
"Copy link": "Copy link",
"Copy link": "Copier le lien",
"Link copied to clipboard": "Link copied to clipboard",
"Paste text": "Paste text",
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)"

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -17,7 +17,7 @@ require('./prettify');
global.prettyPrint = window.PR.prettyPrint;
global.prettyPrintOne = window.PR.prettyPrintOne;
global.showdown = require('./showdown-2.1.0');
global.DOMPurify = require('./purify-3.1.7');
global.DOMPurify = require('./purify-3.2.3');
global.baseX = require('./base-x-4.0.0').baseX;
global.Legacy = require('./legacy').Legacy;
require('./bootstrap-3.4.1');

View File

@ -2120,8 +2120,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
$pasteUrl.click(pasteLinkClick);
// delete link
$('#deletelink').html('<a href="' + deleteUrl + '"></a>');
I18n._($('#deletelink a').first(), 'Delete data');
$('#deletelink').attr('href', deleteUrl);
I18n._($('#deletelink span').not('.glyphicon').first(), 'Delete data');
// enable shortener button
$shortenButton.removeClass('buttondisabled');

File diff suppressed because one or more lines are too long

2
js/purify-3.2.3.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -30,11 +30,11 @@ describe('PasteStatus', function () {
const expected1 = common.urlToString(url1).replace(/&(gt|lt)$/, '&$1a'),
expected2 = common.urlToString(url2).replace(/&(gt|lt)$/, '&$1a'),
clean = jsdom();
$('body').html('<div><div id="deletelink"></div><div id="pastelink"></div></div>');
$('body').html('<a href="#" id="deletelink"><span></span></a><div id="pastelink"></div>');
$.PrivateBin.PasteStatus.init();
$.PrivateBin.PasteStatus.createPasteNotification(expected1, expected2);
const result1 = $('#pasteurl')[0].href,
result2 = $('#deletelink a')[0].href;
result2 = $('#deletelink')[0].href;
clean();
return result1 === expected1 && result2 === expected2;
}

View File

@ -108,8 +108,8 @@ class Configuration
'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==',
'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==',
'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==',
'js/privatebin.js' => 'sha512-y5pDCqVhRdT+tnV0Klp4wfjYPEPz/C31k/16QwaIV3sjQSxQq3mpqMfXlgFzVgxFyRjWQNZHMcik4naNl8rzEw==',
'js/purify-3.1.7.js' => 'sha512-LegvqULiMtOfboJZw9MpETN/b+xnLRXZI90gG7oIFHW+yAeHmKvRtEUbiMFx2WvUqQoL9XB3gwU+hWXUT0X+8A==',
'js/privatebin.js' => 'sha512-K1ruSW69RR4ptss0PgmyPjXW8UnJTyWCQs8cVylQ330AoVL6apWtK3p6vLFHtrHSW6Z1zoA85D6wz1L2JPgKaQ==',
'js/purify-3.2.3.js' => 'sha512-m8Wa/I//YoYMiIahBxDDwYfTnycl+i2DwH58nR8ps1o4KWqXzF8k1K4qHDgAz2HSQFNCNNKH/Qcbfu/jLOuhuQ==',
'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==',
'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',
'js/zlib-1.3.1.js' => 'sha512-5bU9IIP4PgBrOKLZvGWJD4kgfQrkTz8Z3Iqeu058mbQzW3mCumOU6M3UVbVZU9rrVoVwaW4cZK8U8h5xjF88eQ==',

View File

@ -71,7 +71,7 @@ if ($MARKDOWN) :
<?php
endif;
?>
<?php $this->_scriptTag('js/purify-3.1.7.js', 'async'); ?>
<?php $this->_scriptTag('js/purify-3.2.3.js', 'async'); ?>
<?php $this->_scriptTag('js/legacy.js', 'async'); ?>
<?php $this->_scriptTag('js/privatebin.js', 'defer'); ?>
<!-- icon -->
@ -535,12 +535,17 @@ if ($HTTPWARNING) :
endif;
?>
<div id="pastesuccess" class="hidden">
<button id="copyLink" type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Copy link') ?>
</button>
<div class="nav nav-justified">
<button id="copyLink" type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Copy link') ?>
</button>
<a href="#" id="deletelink" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
<span></span>
</a>
</div>
<div role="alert" class="alert alert-success">
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
<div id="deletelink"></div>
<div id="pastelink"></div>
</div>
<?php

View File

@ -55,7 +55,7 @@ if ($MARKDOWN) :
<?php
endif;
?>
<?php $this->_scriptTag('js/purify-3.1.7.js', 'defer'); ?>
<?php $this->_scriptTag('js/purify-3.2.3.js', 'defer'); ?>
<?php $this->_scriptTag('js/legacy.js', 'async'); ?>
<?php $this->_scriptTag('js/privatebin.js', 'defer'); ?>
<!-- icon -->
@ -400,12 +400,17 @@ if ($HTTPWARNING) :
endif;
?>
<div id="pastesuccess" class="hidden">
<button id="copyLink" type="button" class="btn btn-secondary flex-fill mb-2">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#copy" /></svg> <?php echo I18n::_('Copy link') ?>
</button>
<div class="nav justify-content-between mb-2">
<button id="copyLink" type="button" class="btn btn-secondary">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#copy" /></svg> <?php echo I18n::_('Copy link') ?>
</button>
<a href="#" id="deletelink" class="btn btn-secondary">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#trash" /></svg>
<span></span>
</a>
</div>
<div role="alert" class="alert alert-success">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#check" /></svg>
<div id="deletelink"></div>
<div id="pastelink"></div>
</div>
<?php

View File

@ -49,7 +49,7 @@ if ($MARKDOWN):
<?php
endif;
?>
<?php $this->_scriptTag('js/purify-3.1.7.js', 'async'); ?>
<?php $this->_scriptTag('js/purify-3.2.3.js', 'async'); ?>
<?php $this->_scriptTag('js/legacy.js', 'async'); ?>
<?php $this->_scriptTag('js/privatebin.js', 'defer'); ?>
<!-- icon -->

View File

@ -3,7 +3,7 @@
'name' => 'privatebin/privatebin',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'dc85a67a037a5de1111d728d4df07ec2b4001bc5',
'reference' => '8b7ccb0fd4165f14ce7eab19c9213fb5c3ea7b80',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -31,7 +31,7 @@
'privatebin/privatebin' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'dc85a67a037a5de1111d728d4df07ec2b4001bc5',
'reference' => '8b7ccb0fd4165f14ce7eab19c9213fb5c3ea7b80',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),