Commit Graph

4529 Commits

Author SHA1 Message Date
PrivateBin Translator Bot de44e79517 New translations en.json (Polish) 2025-12-13 10:30:04 +01:00
dependabot[bot] 3f5858616d Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 11:04:20 +00:00
El RIDO 5a067e893f Merge pull request #1737 from PrivateBin/attachment_disappears_after_paste_fix
fix: Attachment disappears after a "paste" in the message area
2025-12-10 07:11:47 +01:00
Ribas160 54d002d26f fix: Attachment disappears after a "paste" in the message area 2025-12-09 15:43:59 +02:00
El RIDO 52c0846dad Merge pull request #1734 from PrivateBin/php85
Enable PHP 8.5 testing and handle deprecations
2025-12-03 19:10:03 +01:00
El RIDO 4f28c357ae Merge pull request #1715 from PrivateBin/i18n/soften-html-encoding
fix: do not encode source JSON translation string resulting in wrong display of special characters like '
2025-12-03 19:07:17 +01:00
El RIDO f9e48ae561 Merge pull request #1733 from PrivateBin/sv-enable
enable Swedish translations
2025-12-02 19:09:54 +01:00
El RIDO eaf8f9f92e address PHP 8.5 deprecation 2025-12-02 07:07:04 +01:00
El RIDO 6f778eeec3 address PHP 8.5 deprecation 2025-12-02 06:54:36 +01:00
El RIDO c6343be01b enable PHP 8.5 for testing 2025-12-02 06:44:53 +01:00
El RIDO aa931c7a5c enable Swedish translations 2025-12-02 06:40:07 +01:00
El RIDO a844c19386 Merge pull request #1728 from PrivateBin/crowdin-translation
New Crowdin updates
2025-12-02 06:06:14 +01:00
PrivateBin Translator Bot fdfe8877bc New translations en.json (Swedish) 2025-12-01 21:51:02 +01:00
PrivateBin Translator Bot d87855954f New translations en.json (Corsican) 2025-11-24 17:06:38 +01:00
El RIDO 6087cad88e Merge pull request #1726 from PrivateBin/dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 5 to 6
2025-11-22 08:05:53 +01:00
dependabot[bot] 3be3aeb080 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 11:04:46 +00:00
El RIDO 6220f7e4fa Merge pull request #1721 from PrivateBin/exception-refactoring
Exception handling refactoring
2025-11-21 08:52:48 +01:00
El RIDO 65a90360b6 apply Scrutinizer fix 2025-11-20 09:23:47 +01:00
El RIDO 348d36d6ee prefer DirectoryIterator for readability, also test jbo translation, log deletion errors 2025-11-20 09:13:15 +01:00
El RIDO 3146d41609 apply StyleCI recommendation 2025-11-20 08:28:50 +01:00
El RIDO b4db5f8e57 apply null coalescing operator, strict equality, avoid aliases, prefer empty 2025-11-20 08:19:14 +01:00
El RIDO fc4a92e6a4 apply Scrutinizer fix 2025-11-19 19:40:05 +01:00
El RIDO 9c5ba6ffc3 apply StyleCI recommendation 2025-11-19 19:26:00 +01:00
El RIDO 69e5fc1b05 apply null coalescing operator 2025-11-19 19:24:17 +01:00
El RIDO c8643f187e apply null coalescing operator
Co-authored-by: Mikhail Romanov <42250412+Ribas160@users.noreply.github.com>
2025-11-19 18:45:35 +01:00
El RIDO 0e2055d54a remove unnecessary variable 2025-11-19 11:15:28 +01:00
El RIDO 3caf3214f1 apply StyleCI recommendation 2025-11-19 10:02:15 +01:00
El RIDO 528f2f7221 fix PHP 7.4 compatibility 2025-11-19 09:59:54 +01:00
El RIDO baa79e12e8 apply StyleCI recommendation 2025-11-19 09:57:08 +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 fdd2c67b49 Merge pull request #1717 from PrivateBin/changelog-layout-cleanup
document changes & unify layout
2025-11-18 06:46:35 +01:00
El RIDO a051c4bd6b Merge pull request #1718 from PrivateBin/double-translation
refactor JSON response processing
2025-11-17 09:16:14 +01:00
El RIDO 17c9a4dce5 Merge pull request #1719 from PrivateBin/dependabot/npm_and_yarn/js/js-yaml-4.1.1
Bump js-yaml from 4.1.0 to 4.1.1 in /js
2025-11-15 12:02:47 +01:00
dependabot[bot] f4f655966c Bump js-yaml from 4.1.0 to 4.1.1 in /js
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-15 10:37:12 +00:00
El RIDO e26bcfa733 apply StyleCI recommendation 2025-11-14 10:21:57 +01:00
El RIDO d78c33438d refactor JSON response processing
- avoid translating JSON error messages twice
- separation of concerns, JSON response preparation should not mix handling errors and results, provide two functions instead of one
- callers of JSON error method are responsible for translation of errors
2025-11-14 10:04:41 +01:00
El RIDO 318a37d352 document changes
- forward ported 1.7.9 release changes
- linked all vulnerability reports
- unified heading formats (dropped colons)
2025-11-13 15:38:22 +01:00
rugk 9b3647141d Merge pull request #1713 from PrivateBin/changelog/cve-update
Syncronize changelog with GitHub release doc (for CVE IDs)
2025-11-13 15:06:19 +01:00
rugk 72d4c7aa2b style: clarify comments 2025-11-13 12:33:31 +00:00
rugk e676264616 test: make I18nTest actually reload English translations again 2025-11-13 12:28:03 +00:00
rugk 38a722d2f5 test: make sure to unset HTTP_ACCEPT_LANGUAGE at test teardown 2025-11-13 12:19:49 +00:00
rugk 2c4dd2594c fix: do not encode source JSON translation string resulting in wrong display of special characters like '
Fixes #1712

Disclosure: Coded with help of Copiot. (description wrtten by me)

So this does indeed loosen the encoding a bit. However, IMHO, it was neither better before though. You could always bypass the encoding for `args{0]` when  you just include `<a` (or the other tag) somewhere or so.

**One important notice:** This was (due to the exceptions before and afterwards) valid before and also now: Translators **could** (and can) if they have malicious intent, inject/do "XSS attacks".
Thus, translations PRs (also from Crowdin) should be reviewed for wild HTML code inside translations. I suppose this is easy to fix, but anyway a valid risk.

But IMHO, we should teat the JSON files being part of our source code as a "trusted source". In the end, such an attak is basicaly just ends up being injecting malicious code. I hope such contributors would be detected.

References I explicitly checked again to not introduce an XSS here: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html and the PHP doc for he HTML encoding.

I feel the safter way obviously would be encoding the _whole_ string _after_ translation (just like you should apply DOMPurify after everything), but as explained it was not done before and would break compatibility. Also, I looked through the sources and I see no risk described by doing it only for the "dangerous" "untrusted" inputs.
Only here is a notice that `%s` shall not be used in some contexts, for example to define a tag: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#dangerous-contexts (obviously in such a case, attacks may be possible even with encoding; but again; this is nothing new)

The basic "problem" of it all is: We want HTML to be translated/be usable in our translation. If we'd get rid of that, we would get for sure rid of all such XSS attack possibilities. But that woud be a bigger refactoring, so IMHO, this here is fine for a fix for the issue at hand.

Ah another point: I think the `is_int` check is harmless, but it's also kinda useless. Maybe it is some kind of obscure performance optimisation. (Yeah ints have nothing to encode as they have nothing that could be used for XSS, but they could also just be passed through that function.)
2025-11-13 10:52:08 +00:00
rugk 4cdc6871e7 docs: use CVE website link
Co-authored-by: El RIDO <elrido@gmx.net>
2025-11-13 10:35:49 +01:00
rugk 14ffbc68e2 Merge pull request #1698 from PrivateBin/ai/addCopilotInstructions
Add GitHub Copilot instructions
2025-11-13 09:36:15 +01:00
rugk 3ede063e0a Syncronize changelog with GitHub release doc (for CVE IDs)
Aka adding the CVE ID's. BTW GitHub will make the CVEs clickable automatically when published. As for the GitHub's own ID well yeah… I just kept it synchronous now. (Maybe it's not _that_ relevant to mention all that IDs.)
2025-11-12 20:42:05 +01:00
rugk f4216b34df Apply suggestions from code review
Co-authored-by: El RIDO <elrido@gmx.net>
2025-11-12 19:36:05 +01:00
rugk 10be6c25bf Merge pull request #1709 from PrivateBin/devcontainer/composer
Install PHP/composer unit testing dependencies globally for DevContainer
2025-11-12 15:37:38 +01:00
El RIDO d32ac29925 chore: prepare for next release 2025-11-12 08:51:05 +01:00
El RIDO 19ca6d3dab incrementing version 2.0.3 2025-11-12 08:00:50 +01:00