strange HTTP request ending with "type_error:SafeUrl"

1.3k views Asked by At

I'm gettig some strange HTTP requests, like:

"POST /type_error:SafeUrl HTTP/1.1"
"GET /some/path/type_error:SafeUrl HTTP/1.1"
"POST /another/long/path/type_error:SafeUrl HTTP/1.1"
"POST /another/very/long/path/type_error:SafeUrl HTTP/1.1"

Mainly POST but GET too, mainly on iPhone, and I'm quite sure that the origin is triggered by some "type_error" in JS.

The only pattern is /type_error:SafeUrl at the end of the URL.

Unfortunately I'm not able to reproduce it. As I can see it comes from Fundingchoices library.

How can I solve/dig/approach this issue?

I know that this is not a fully compliant query, but I hope to match the same "bad" experience in someone that had already solved this problem.

4

There are 4 answers

1
Magnus J On BEST ANSWER

I think it is a bug in Funding Choices.

Deep down in some ad-blocking detection code loaded by Funding Choices I found the following being part of a reportClientEvent(...) call:

_.Cc = function(a) {
    return a instanceof _.Vb && a.constructor === _.Vb ? a.g : "type_error:SafeUrl"
}

a.g is a URL (https://fundingchoicesmessages.google.com/el/AGSKWxVK...) but a is not an instance of _.Vb, so we end up with type_error:SafeUrl being returned as the URL for the XMLHttpRequest request.

I expect this to be a bug because requesting 'type_error:SafeUrl' without domain or protocol will not result in anything useful.

These kinds of requests started yesterday (2022-01-20 17:30 UTC) in large amounts on our website, suggesting that an update was release around that time somewhere. I wish I could find a changelog for Funding Choices ...

UPDATE: I've been in touch with the Funding Choice team, and they expect to release a fix early next week (possible Monday).

UPDATE: Malformed traffic disappeared on our server at around 2022-01-25 23:00 UTC.

0
rvh On

been getting this too on my sites, tons of it.

seeing the answer here, the only thing i can think of is a few days ago i activated GDPR and CCPA in adsense.

perhaps report to adsense feedback?

1
Cengiz Caliskan On

None of these requests pass the Cloudflare JS Challenge.enter image description here

0
Ishtiaq Ali On

After applying different solutions I found out the real cause. And that is the script of Google Adsense.

Our web server was not able to handle the type_error:SafeUrl and it was choking the RAM of our server. so once we removed the adsbygoogle.js file website was restored and worked fine. I don't know why Google release this update without testing.