Treblle / treblle-laravel

The official Treblle SDK for Laravel. Seamlessly integrate Treblle to manage communication with your dashboard, send errors, and secure sensitive data.
https://www.treblle.com/
MIT License
129 stars 24 forks source link

FieldMasker::isHeader(): Argument #1 ($name) must be of type string, int given. #59

Closed jaketoolson closed 1 year ago

jaketoolson commented 1 year ago

Version

Description

I'm getting this error:

Treblle\Utils\Masking\FieldMasker::isHeader(): Argument #1 ($name) must be of type string, int given, called in /var/www/html/vendor/treblle/utils/src/Masking/FieldMasker.php on line 41

Headers:


Accept | application/json
-- | --
Accept-Encoding | gzip, deflate, br
Accept-Language | en-US,en;q=0.5
Authorization | [Filtered]
Content-Length | 301
Content-Type | application/json
Cookie | [Filtered]
Forwarded | for=174.52.***.***;host=api.***.io;proto=https
Host | api.***.io
Origin | https://app.***.io
Referer | https://app.***.io/
Sec-Fetch-Dest | empty
Sec-Fetch-Mode | cors
Sec-Fetch-Site | same-site
User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
Via | HTTP/1.1 AmazonAPIGateway
X-Amzn-Trace-Id | Root=1-6463a2f3-6add634f59c984e411540b91
X-Forwarded-Port | 443

Steps to reproduce

  1. ...
  2. ...
  3. ...

Expected behavior

I don't expect to receive this error when the code is checking for headers (string) but receives an int? as a header name?

Notes

Any additional useful informations, like related issues, ...

YannikFirre commented 1 year ago

Same issue.

Wouldn't the problem come from the POST data sent as an array and the recursivity of the mask function?

Like this : image

JustSteveKing commented 1 year ago

This is now fixed in the latest release