77 Commits

Author SHA1 Message Date
El RIDO
b4db5f8e57 apply null coalescing operator, strict equality, avoid aliases, prefer empty 2025-11-20 08:19:14 +01:00
El RIDO
69e5fc1b05 apply null coalescing operator 2025-11-19 19:24:17 +01:00
El RIDO
3a23117ebf Refactored translation of exception messages 2025-11-19 09:36:40 +01:00
El RIDO
3e6f1733f9 refactored exceptions in controller
- added missing exception doc blocks
- introduced exception type that translates message during construction
- catch explicit exception types where possible
2025-11-19 09:36:39 +01:00
El RIDO
bde805d2f1 replaced the term "paste" with the more generic "document"
kudos @Ribas160
2025-07-25 08:16:08 +02:00
El RIDO
ddd2d72064 replaced the term "paste" with the more generic "document"
Some of the references to "paste" in code or comments got changed as well, but to clarify the intended usage of the terms:

- A PrivateBin document can consist of a paste text (key "paste" in the encrypted payload) and one or several attachments and discussion entries.
- Internally the root document is called a "Paste" and each discussion entry is called a "Discussion".
- When referring to a whole document with one paste and optional discussion(s), we call it just "document".
- When talking about a particular JSON payload type in the internal logic, i.e. during storage or transmission, we call them a paste or discussion to distinguish which type we refer to.

closes #397
2025-07-24 10:46:31 +02:00
El RIDO
734b85eb08 remove more v1 remnants
kudos @Ribas160
2025-07-21 12:28:40 +02:00
El RIDO
c99e6895dd remove more v1 remnants
kudos @Ribas160
2025-07-19 20:09:37 +02:00
El RIDO
f7cf389f36 remove v1 backend support and version checks in the frontend 2025-07-05 17:21:12 +02:00
El RIDO
6d5323e351 drop legacy paste format support
remove support for ZeroBin & v1 pastes and base64 & rawinflate libraries
2025-07-05 11:06:30 +02:00
El RIDO
7825471d70 avoid duplication of ID check 2025-03-13 08:14:01 +01:00
El RIDO
629f263cf5 pass by reference, closes #858 2025-03-11 08:22:21 +01:00
El RIDO
cebc9acce6 enable strict types in PHP 2024-06-04 07:13:55 +02:00
El RIDO
05402ef304 remove version from doc blocs
- @version in file header level isn't used on code docs, it is intended
  for API versions at class or method level
- avoids needing to update all these files on version increment
- avoids needing to regenerate SRI hashes for privatebin.js through
  extra phpunit run
- simplifies VERSION_FILES list
- avoids having to filter above list during loop
- adds a few missing doc bloc headers
2024-05-28 21:03:22 +02:00
El RIDO
22419cd68a incrementing version 2024-05-13 19:18:30 +02:00
El RIDO
5067e9222c incrementing version 2024-05-05 20:43:33 +02:00
El RIDO
49bc97e295 apply StyleCI recommendation 2024-05-05 11:16:17 +02:00
El RIDO
0f9158b37b allow disabling comment date display using discussiondatedisplay configuration option 2024-05-04 14:38:41 +02:00
El RIDO
041068b590 apply Scrutinizer recommendation 2024-05-01 21:07:24 +02:00
El RIDO
b2db26998d remove the old keys, if they are still stored 2024-05-01 20:32:39 +02:00
El RIDO
a9f1926b96 implement chrono privacy for pastes, addresses #1290 2024-05-01 20:16:03 +02: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
El RIDO
aad975a721 incrementing version 2024-02-11 15:31:11 +01:00
El RIDO
a3ee624d3a incrementing version 2024-02-11 14:17:27 +01:00
El RIDO
d0420fb418 1.6.2 release 2023-12-15 07:20:20 +01:00
El RIDO
3bd570bd6a incrementing version 2023-12-04 21:07:17 +01:00
El RIDO
f56907bd38 increment version 2023-09-11 19:36:45 +02:00
El RIDO
01afe7d481 incrementing version 2023-07-09 08:44:22 +02:00
El RIDO
e84a8694e4 incrementing version 2022-12-24 05:52:07 +01:00
El RIDO
b5602dd1ae incrementing version 2022-12-11 05:02:15 +01:00
El RIDO
89d575ace3 in light of the perf/size test results of Jdenticons, switch back to Identicons as the default 2022-10-30 09:24:35 +01:00
El RIDO
8ac69590cf add new Jdenticon comment icon library, set it as default, fixes #793 2022-10-26 06:53:56 +02:00
El RIDO
456ced37c2 incrementing version 2022-04-05 07:30:51 +02:00
El RIDO
7901ec74a7 folding Persistance\ServerSalt into Data\Filesystem 2021-06-08 22:01:29 +02:00
El RIDO
458ebcb321 incrementing version 2021-04-05 17:05:14 +02:00
El RIDO
9914c37683 incrementing version 2020-03-22 06:44:04 +01:00
El RIDO
adece1d784 incrementing version 2020-02-16 11:15:51 +01:00
El RIDO
ed590ee557 incrementing version 2020-01-08 19:31:06 +01:00
El RIDO
2d4edfe401 incrementing version number in preparation of release 2019-09-22 19:42:04 +02:00
El RIDO
07018e5876 incrementing version number in preparation of release 2019-07-08 18:35:34 +02:00
El RIDO
a459c4692c correcting API use, avoid history glitch 2019-06-01 23:49:40 +02:00
El RIDO
09162a3c57 fix display of v2 pastes in JS, fixing parsing of comments in PHP, avoid exposing expiration date (we provide time_to_live, would allow calculation of creation date of paste) 2019-05-15 07:44:03 +02:00
El RIDO
cc1c55129f switching to full JSON API without POST array use, ensure all JSON operations are done with error detection 2019-05-13 22:31:52 +02:00
El RIDO
be1e7babc0 removing dead code and improving code coverage 2019-05-11 22:18:35 +02:00
El RIDO
a622c8f484 fix logic, avoid 5.5 2019-05-10 23:27:45 +02:00
El RIDO
c3719435a3 and fixing PHP 5.5 2019-05-10 23:09:35 +02:00
El RIDO
02f3cc739f documentation on fnv1a64 is lacking, but tests show it was only introduced with PHP 5.6 2019-05-10 22:46:39 +02:00
El RIDO
f58cbefd1e revert scalar type hints to retain support for PHP < 7.0 2019-05-10 22:13:11 +02:00
El RIDO
1e44902340 apply StyleCI patch 2019-05-10 21:45:34 +02:00
El RIDO
700f8a0ea7 made all php unit tests pass again 2019-05-10 07:55:39 +02:00