AmazonBot URL-munging broke Val(Url.id) [SOLVED]

AmazonBot has been inexplicably munging various URL parameters.

Hypothetical example:

https://www.example.com/index.cfm?id=123&foo=xyz

Becomes:

https://www.example.com/test.cfm?id=...xyz

So if you happen to use Val(Url.id), the first dot in the string value "...xyz" is apparently treated as though it were a decimal point, thus triggering the error:

cannot cast [.] string to a number value

Then I received annoying email notifications from my error handling script.

The solution depends on your code, but mine was to simply validate using:

isValid("integer", Url.id)

Due to the appearance of an attempted attack, I confirmed the legitimacy of the IP addresses via PTR records, but I decided to block AmazonBot because it’s quite intrusive with the volume of requests using server resources and my sites don’t benefit from having data in Alexa. :stuck_out_tongue:

I just wanted to document this in case it helps anyone else!

1 Like