Replaced _constant_time_compare with werkzeug's safe_str_cmp.