Commit graph

3224 commits

Author SHA1 Message Date
El RIDO
658383e6d1
set lang cookie with strict SameSite property 2024-04-21 11:36:31 +02:00
El RIDO
15481290fb
fix tab alignment 2024-04-21 11:02:14 +02:00
El RIDO
545ba7506e
bootstrap 5 - fix password modal display 2024-04-21 11:01:40 +02:00
El RIDO
a7ea62fcd0
bootstrap 5 prettify dark theme support
current status:
- made prettify theme work with dark mode

to be done:
- fix password modal display
- add "Dark Mode" to translation strings
- check tab alignment in HTML source
2024-04-19 14:00:49 +02:00
El RIDO
491ed9a521
bootstrap 5 template function complete
current status:
- got expiration and format selections to work
- fixed modals (password, QR-code, etc.)
- replaced glyphicons with Bootstrap icons (needs CSP relaxation to work)
- tested the different settings and combinations
- got editor tabs to change active status

to be done:
- add "Dark Mode" to translation strings
- figure out how to change prettify theme when dark mode gets selected
- check tab alignment in HTML source
2024-04-18 21:36:43 +02:00
El RIDO
7565be8ed5
initial work on a bootstrap 5 template
current status:
- renders without PHP errors & passes unit tests
- displays pastes
- responsive navbar
- right-to-left support
- auto dark mode with toggle

to be done:
- add "Dark Mode" to translation strings
- get expiration and format selections to work
- fix modals (password, QR-code, etc.)
- replace glyphicons with Bootstrap Icons (no longer included)
- test all the different settings and combinations
- check tab alignment in HTML source
2024-04-01 18:59:28 +02:00
El RIDO
3bc09ed561
Merge pull request #1275 from PrivateBin/legacy-php-cleanup
input sanitation & removing some obsolete version checks
2024-03-26 06:33:57 +01:00
El RIDO
b75aee6834
Merge pull request #1277 from Zwyx/add-header
Add response header `X-Uncompressed-Content-Length` for JSON API
2024-03-24 18:58:01 +01:00
Zwyx
6130547ca6
Add response header X-Uncompressed-Content-Length for JSON API
Because the response from the API is PHP output, the usual `Content-Length` header is absent.

This [custom header technique](https://stackoverflow.com/questions/15097712/how-can-i-use-deflated-gzipped-content-with-an-xhr-onprogress-function/32799706#32799706) allows the client to know the total length of the data being received, in order to display a progress indicator.

Here's a code example with `XMLHttpRequest`:


```
xhr.addEventListener("progress", (e) => {
	if (e.lengthComputable) {
		onDownloadProgress({
			loaded: e.loaded,
			total: e.total,
		});
	} else {
		const uncompressedContentLength = xhr.getResponseHeader(
			"X-Uncompressed-Content-Length",
		);

		if (uncompressedContentLength) {
			onDownloadProgress({
				loaded: e.loaded,
				total: Number(uncompressedContentLength),
			});
		}
	}
});
```

Notes:
- `Fetch` can be used as well (only reason I use `XMLHttpRequest` is because `fetch` doesn't allow to track the progress of uploaded data (when creating a paste); whereas `XMLHttpRequest` does).
- `e.loaded` can be different between browsers; Firefox reports the length of the compressed data, Chrome reports the length of uncompressed data (see https://github.com/whatwg/xhr/issues/388). A workaround for this is to manually set our progress indicator to 100% when the request finishes.
2024-03-24 19:40:50 +08:00
El RIDO
776030c08a
Merge pull request #1273 from PrivateBin/crowdin-translation
New Crowdin updates
2024-03-23 11:33:02 +01:00
El RIDO
65a626f940 inputs sanitation & remove some obsolete version checks
using filter_vars instead of filter_input, because our unit tests depend on manipulating global arrays, which are not used by filter_input - we would have to mock the function in the unit testing, it therefore is cleaner to use the same code paths in testing as in production

some inputs in I18n and TrafficLimiter remain unfiltered, since we already validate them by other means (IP lib and/or preg_match)

our minimum PHP version is 7.3, so we can drop the two < 5.6 fallback checks
2024-03-23 11:27:25 +01:00
PrivateBin Translator Bot
8ec1fc626b New translations en.json (Chinese Simplified) 2024-03-23 09:24:14 +01:00
PrivateBin Translator Bot
59eb6570ee New translations en.json (Ukrainian) 2024-03-23 09:24:13 +01:00
PrivateBin Translator Bot
6e780d516c New translations en.json (Russian) 2024-03-23 09:24:13 +01:00
PrivateBin Translator Bot
14733d7ce0 New translations en.json (Norwegian) 2024-03-23 09:24:12 +01:00
PrivateBin Translator Bot
02f9384a97 New translations en.json (Dutch) 2024-03-23 09:24:11 +01:00
PrivateBin Translator Bot
e2f9e24d4b New translations en.json (Italian) 2024-03-23 09:24:10 +01:00
PrivateBin Translator Bot
04676fe61d New translations en.json (German) 2024-03-23 09:24:09 +01:00
PrivateBin Translator Bot
18d49148e1 New translations en.json (Romanian) 2024-03-23 09:24:08 +01:00
PrivateBin Translator Bot
9f23b23da0 New translations en.json (French) 2024-03-23 09:24:07 +01:00
El RIDO
9997178928
Merge pull request #1274 from PrivateBin/dependabot/composer/phpunit/phpunit-9.6.18
Bump phpunit/phpunit from 9.6.17 to 9.6.18
2024-03-23 09:04:33 +01:00
PrivateBin Translator Bot
7c82eec40c New translations en.json (Arabic) 2024-03-23 08:27:03 +01:00
PrivateBin Translator Bot
2dbedf2219 New translations en.json (Corsican) 2024-03-22 15:19:42 +01:00
dependabot[bot]
6510e1b4e2
Bump phpunit/phpunit from 9.6.17 to 9.6.18
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.17 to 9.6.18.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.18/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.17...9.6.18)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 12:01:52 +00:00
PrivateBin Translator Bot
b5bc5753db New translations en.json (Corsican) 2024-03-22 07:50:35 +01:00
PrivateBin Translator Bot
a9d64421d3 New translations en.json (Chinese Simplified) 2024-03-22 07:50:30 +01:00
PrivateBin Translator Bot
84a203b153 New translations en.json (Ukrainian) 2024-03-22 07:50:29 +01:00
PrivateBin Translator Bot
677dd54505 New translations en.json (Russian) 2024-03-22 07:50:26 +01:00
PrivateBin Translator Bot
63df1ac8ed New translations en.json (Norwegian) 2024-03-22 07:50:24 +01:00
PrivateBin Translator Bot
6d79a2ed43 New translations en.json (Dutch) 2024-03-22 07:50:23 +01:00
PrivateBin Translator Bot
d7a317dfaf New translations en.json (Italian) 2024-03-22 07:50:21 +01:00
PrivateBin Translator Bot
ab0126af7c New translations en.json (German) 2024-03-22 07:50:18 +01:00
PrivateBin Translator Bot
310a4cb54d New translations en.json (Arabic) 2024-03-22 07:50:15 +01:00
PrivateBin Translator Bot
f1627ea929 New translations en.json (Romanian) 2024-03-22 07:50:14 +01:00
PrivateBin Translator Bot
c43e557cc5 New translations en.json (French) 2024-03-22 07:50:13 +01:00
El RIDO
1870b9075c Merge branch 'cloudrac3r-patch-1' 2024-03-22 07:44:47 +01:00
Chris Dailey
028626ac1e Update conf.sample.php
A small comment addition to `conf.sample.php` that mentions the other strings to use for the included themes. The "bootstrap-dark" one in particular is perhaps not obvious to any user who doesn't look at the contents of `tpl/bootstrap.php`.
2024-03-22 07:42:43 +01:00
dependabot[bot]
44dd410dec Bump slsa-framework/slsa-github-generator from 1.9.0 to 1.10.0
Bumps [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 07:42:43 +01:00
El RIDO
bf2bb7c4ff
Merge pull request #1272 from nitz/conf-sample-add-theme-names
Update conf.sample.php
2024-03-22 07:37:38 +01:00
El RIDO
1eb3ead364
Merge pull request #1271 from PrivateBin/dependabot/github_actions/slsa-framework/slsa-github-generator-1.10.0
Bump slsa-framework/slsa-github-generator from 1.9.0 to 1.10.0
2024-03-22 07:36:34 +01:00
Cadence Ember
d4fdc563ae Update all instances of text in language files 2024-03-22 11:25:17 +13:00
Chris Dailey
1c9da2ffac
Update conf.sample.php
A small comment addition to `conf.sample.php` that mentions the other strings to use for the included themes. The "bootstrap-dark" one in particular is perhaps not obvious to any user who doesn't look at the contents of `tpl/bootstrap.php`.
2024-03-21 09:01:01 -04:00
dependabot[bot]
383dbf1c79
Bump slsa-framework/slsa-github-generator from 1.9.0 to 1.10.0
Bumps [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 11:46:25 +00:00
Cadence Ember
070ce7e196
Update en.json
Change notice when opening burn after reading
2024-03-20 09:15:05 +13:00
El RIDO
74ac3350a3
Merge pull request #1268 from PrivateBin/crowdin-translation
New Crowdin updates
2024-03-18 19:24:44 +01:00
PrivateBin Translator Bot
5a52f71bb7 New translations en.json (French) 2024-03-18 18:14:41 +01:00
El RIDO
f0794e3c0b document & attribute changes from #1267 2024-03-18 07:48:20 +01:00
El RIDO
db287a10fe
Merge pull request #1267 from asherber/shorten-yourls
Allow for shortenviayourls in query params
2024-03-18 07:42:59 +01:00
Aaron Sherber
7a4c6c010f
Update conf.sample.php 2024-03-16 19:46:57 -04:00
Aaron Sherber
7c9cc7754f
Allow for shortenviayourls in query params 2024-03-16 16:55:49 -04:00