diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2016-08-18 15:49:55 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2016-08-18 15:49:55 +0100 |
commit | d7b42afc74662afef983bc42ff6e50b2deb91e0e (patch) | |
tree | c423d6751e2c8a921ddab486cf2cb6d794001fbe /synapse | |
parent | Scattergather the call out to ASes; validate received results (diff) | |
download | synapse-d7b42afc74662afef983bc42ff6e50b2deb91e0e.tar.xz |
Log a warning if an AS yields an invalid 3PU lookup result
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/appservice.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index cd55f6b7f1..5ed694e711 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -184,7 +184,12 @@ class ApplicationServicesHandler(object): continue if not isinstance(result, list): continue - ret.extend(r for r in result if _is_valid_3pu_result(r)) + for r in result: + if _is_valid_3pu_result(r): + ret.append(r) + else: + logger.warn("Application service returned an " + + "invalid result %r", r) defer.returnValue(ret) |