Fixed #23806 -- Added a test case for settings.DISALLOWED_USER_AGENTS.

Any suggestions or feedback is welcome.
Great, I just change this line to check the message in calls rather than simply its length.