summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-08-18 15:49:55 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-08-18 15:49:55 +0100
commitd7b42afc74662afef983bc42ff6e50b2deb91e0e (patch)
treec423d6751e2c8a921ddab486cf2cb6d794001fbe /synapse/handlers/appservice.py
parentScattergather the call out to ASes; validate received results (diff)
downloadsynapse-d7b42afc74662afef983bc42ff6e50b2deb91e0e.tar.xz
Log a warning if an AS yields an invalid 3PU lookup result
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r--synapse/handlers/appservice.py7
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)