Commit graph

11 commits

Author SHA1 Message Date
TowyTowy
a0c0d154ee fix: handle YOURLS 200 response without shorturl gracefully
When YOURLS replies with statusCode 200 but no "shorturl" field,
YourlsProxy::_extractShortUrl() returned int 0 for its ?string return
type. Under the file's declare(strict_types=1) this raises an uncaught
TypeError, aborting paste creation instead of surfacing the intended
"Error parsing proxy response" message. Fall back to null (matching
ShlinkProxy) so the existing graceful error path is taken.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 23:02:26 +02:00
Ribas160
f0e5001982
fix: cast statusCode to int before strict comparison 2026-05-25 23:34:57 +03:00
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
rugk
cfc687d62b style: fix indentation 2025-09-03 14:12:12 +00:00
rugk
879b696f22 wipfix: correct contatenation of options 2025-09-03 13:43:57 +00:00
rugk
2c1a17a07f
Strengthen validation of URL in proxy services
This should definitively rule out any circumstances, where invalid URLs could cause problems.

Both URL validity is checked before it is forwarded to the URL shortener proxy _and_ the host part is explicitly compared to make sure the domain is really the same one.

TOOD:
* [ ] some tests may be needed here (hmpff…)
2025-09-02 22:40:22 +02:00
Karthik Kasturi
77395c147f updated test cases, added clarity in error messages 2025-08-20 01:23:06 +00:00
Karthik Kasturi
0be1cef224 i18n updates 2025-08-19 21:39:16 +01:00
Karthik Kasturi
7ec8bc6ef1 chore: moved proxy classes to different folder and namespaces 2025-08-19 20:34:39 +01:00