You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent changes to scrub data from $c->req->data if using Catalyst::Controller::REST break file uploads - causing e.g.:
[Tue Sep 19 13:56:47 2023] [error] Caught exception in engine "multipart/form-data does not have an available data handler. Valid data_handlers are application/json, application/x-www-form-urlencoded." <at /usr/local/lib/perl5/Catalyst.pm line 2420>
This will be a fun one - need to know whether it's safe to call $c->req->data before doing so - presumably look at $c->req->content_type and see if there is an available handler that can process that - need a clean way to determine that.
Stringification of numbers - scrubbing a number changes it:
$ $bar = 5;
5
$ Dump($bar);
SV = IV(0x55b98ab228c8) at 0x55b98ab228d8
REFCNT = 2
FLAGS = (IOK,pIOK)
IV = 5
$ $bar = $s->scrub($bar);
5
$ Dump($bar);
SV = PVIV(0x55b98ab15130) at 0x55b98ab228d8
REFCNT = 2
FLAGS = (POK,pPOK)
IV = 5
PV = 0x55b98a152800 "5"\0
CUR = 1
LEN = 10
The text was updated successfully, but these errors were encountered:
Only call `$c->req->body_data` if the request content type is one
there's a data handler for - otherwise we'll cause an exception e.g.:
```
[error] Caught exception in engine "multipart/form-data does not have
an available data handler. Valid data_handlers are application/json,
application/x-www-form-urlencoded." <at /usr/local/lib/perl5/Catalyst.pm line 2420>
```
Also, add tests for multi-part file uploads, to ensure that the content
of uploaded files is left alone, but any other normal POST parameters
are still scrubbed.
Only call `$c->req->body_data` if the request content type is one
there's a data handler for - otherwise we'll cause an exception e.g.:
```
[error] Caught exception in engine "multipart/form-data does not have
an available data handler. Valid data_handlers are application/json,
application/x-www-form-urlencoded." <at /usr/local/lib/perl5/Catalyst.pm line 2420>
```
Also, add tests for multi-part file uploads, to ensure that the content
of uploaded files is left alone, but any other normal POST parameters
are still scrubbed.
Couple of issues caused by the recent introduction of recursive scrubbing of encoded PUT/POST bodies - PR #3 :
Need to stop this, e.g.
etc.
$c->req->data
if using Catalyst::Controller::REST break file uploads - causing e.g.:This will be a fun one - need to know whether it's safe to call
$c->req->data
before doing so - presumably look at$c->req->content_type
and see if there is an available handler that can process that - need a clean way to determine that.The text was updated successfully, but these errors were encountered: