in libmozdata/socorro.py [0:0]
def __has_deprecated_unredacted_params(self, params):
"""Check if the params is requesting PII data that we used to
automatically support retrieving it by redirecting the request to the
unredacted endpoint (i.e., SuperSearchUnredacted).
"""
if not isinstance(params, dict):
# This is a workaround to avoid crashing when the params values is a
# list of params. We could instead of this, check each item in the
# list, but it's not worth it since this method is just for backward
# compatibility.
return False
unredacted = False
if "_facets" in params:
facets = params["_facets"]
if "url" in facets or "email" in facets:
unredacted = True
if not unredacted and "_columns" in params:
columns = params["_columns"]
if "url" in columns or "email" in columns:
unredacted = True
if not unredacted:
for k, v in params.items():
if (
"url" in k
or "email" in k
or (
(isinstance(v, list) or isinstance(v, six.string_types))
and ("url" in v or "email" in v)
)
):
unredacted = True
return unredacted