removed CSP tag from shortenerproxy.php

This commit is contained in:
Karthik Kasturi 2025-09-11 18:17:30 +01:00
parent 191ed63b04
commit 24afa5a1d8
4 changed files with 2 additions and 4 deletions

View file

@ -2151,7 +2151,7 @@ jQuery.PrivateBin = (function($) {
response = JSON.stringify(response);
}
if (typeof response === 'string' && response.length > 0) {
const shortUrlMatcher = /(?<=[>"])https?:\/\/[^\s"<]+(?=[<"])/g; // JSON API will have URL in quotes, XML in tags
const shortUrlMatcher = /https?:\/\/[^\s"<]+/g; // JSON API will have URL in quotes, XML in tags
const shortUrl = (response.match(shortUrlMatcher) || []).filter(function(urlRegExMatch) {
if (typeof URL.canParse === 'function') {
return URL.canParse(urlRegExMatch);

View file

@ -149,7 +149,6 @@ describe('PasteStatus', function () {
'<html lang="en">\n' +
'\t<head>\n' +
'\t\t<meta charset="utf-8" />\n' +
'\t\t<meta http-equiv="Content-Security-Policy" content="default-src \'none\'; base-uri \'self\'; form-action \'none\'; manifest-src \'self\'; connect-src * blob:; script-src \'self\' \'unsafe-eval\'; style-src \'self\'; font-src \'self\'; frame-ancestors \'none\'; img-src \'self\' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads">\n' +
'\t\t<meta name="robots" content="noindex" />\n' +
'\t\t<meta name="google" content="notranslate">\n' +
'\t\t<title>PrivateBin</title>\n' +