From 22282647720da3f84759130655a3095642d931fe Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 11 Sep 2013 13:59:45 +0200 Subject: flag failed auth attempts in DB table hubloc --- include/zot.php | 4 +++- mod/post.php | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/zot.php b/include/zot.php index dd6d1842c..ee4fe940f 100644 --- a/include/zot.php +++ b/include/zot.php @@ -903,8 +903,10 @@ function zot_import($arr) { $result = process_channel_sync_delivery($i['notify']['sender'],$arr,$deliveries); } } - if($result) + if($result){ + logger('delivery result: ' . print_r($result,tue) ); $return = array_merge($return,$result); + } } } diff --git a/mod/post.php b/mod/post.php index 70dd4dc19..7510a028f 100644 --- a/mod/post.php +++ b/mod/post.php @@ -127,6 +127,12 @@ function post_init(&$a) { info(sprintf( t('Welcome %s. Remote authentication successful.'),$x[0]['xchan_name'])); logger('mod_zot: auth success from ' . $x[0]['xchan_addr'] . ' for ' . $webbie); + } else { + logger('mod_zot: still not authenticated: ' . $x[0]['xchan_addr']); + q("update hubloc set hubloc_status = ( hubloc_status ^ %d) where hubloc_addr = '%s'", + intval(HUBLOC_RECEIVE_ERROR), + $x[0][xchan_addr] + ); } // FIXME - we really want to save the return_url in the session before we visit rmagic. -- cgit v1.2.3 From 82f4b1767e5af692b25ca6cff9cec64ed6cb7ec6 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 11 Sep 2013 14:05:33 +0200 Subject: delete logger line; was the wrong place. --- include/zot.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/zot.php b/include/zot.php index ee4fe940f..248a1419b 100644 --- a/include/zot.php +++ b/include/zot.php @@ -904,7 +904,6 @@ function zot_import($arr) { } } if($result){ - logger('delivery result: ' . print_r($result,tue) ); $return = array_merge($return,$result); } } -- cgit v1.2.3 From 2c06a2c16321e8ae80ba04b920b20d378be6325d Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 11 Sep 2013 15:24:26 +0200 Subject: implement tip from Mike, corrected the sql statement --- mod/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/post.php b/mod/post.php index 7510a028f..c4254b10a 100644 --- a/mod/post.php +++ b/mod/post.php @@ -129,7 +129,7 @@ function post_init(&$a) { } else { logger('mod_zot: still not authenticated: ' . $x[0]['xchan_addr']); - q("update hubloc set hubloc_status = ( hubloc_status ^ %d) where hubloc_addr = '%s'", + q("update hubloc set hubloc_status = (hubloc_status | %d ) where hubloc_addr = '%s'", intval(HUBLOC_RECEIVE_ERROR), $x[0][xchan_addr] ); -- cgit v1.2.3