Phishing Protection: Server Spec: Difference between revisions

Jump to navigation Jump to search
Line 220: Line 220:


Use the reverse of these steps to contruct an encrypted hash table yourself.
Use the reverse of these steps to contruct an encrypted hash table yourself.
==== Canonical Hostname Creation ====
Extract the hostname from the URL and then follow these steps:
* Remove all characters that match the following regular expressions:
** "[\x01-\x1f\x7f-\xff]+"
** "^\\.+|\\.+$"
* Replace consecutive dots with a single dot.
* Try to parse the resulting hostname as IP address.  If it can be parsed, replace the current canonical hostname with the corresponding IP address.
* Escape all characters that are not alphanumeric or '.' or '-'.
* Strip all leading components so that the resulting hostname has at most 5 components separated by dots.
* Lowercase the whole string.
Use the resulting hostname for the encrypted hash lookup described above.


== Report Requests ==
== Report Requests ==

Navigation menu