Comment 5 for bug 1820225

Revision history for this message
Bryce Harrington (bryce) wrote :

"Based on a cursory audit of django, I could not find any condition where the user agent would be
returned as anything other than a string."

I confirm this assessment - in examining the code there does not appear to be any means for user input to trigger the exceptions in is_robot(). The only situation I can envision is if some day the code changes, either by adding a new assertion/exception in is_robot(), or if hyperkitty tweaks the useragent input parameter before the call. It would be very surprising if either of those things ever came to pass.

However, for sake of defensive programming it probably would hurt little to paper over this case via a trivial patch such as attached.