diff options
author | Christoph Burschka | 2014-08-23 07:49:26 +0000 |
---|---|---|
committer | Christoph Burschka | 2014-08-23 07:49:26 +0000 |
commit | 02599b364288aa62a257b5b10841a574a3b66374 (patch) | |
tree | e1b5a1f162a98e2cacfefd4ec1274fd2211a5e3a /plugins/session/BridgeSession.php | |
parent | Merge pull request #6 from sylae/master (diff) | |
download | ejabberd-auth-php-02599b364288aa62a257b5b10841a574a3b66374.tar.gz |
Fix #7: Fix the pruning query.
session.module is supposed to prune expired auth tokens
on every login request. The pruning query had the incorrect
SQL syntax "DELETE COUNT(*) FROM" which mysql does not accept.
Diffstat (limited to 'plugins/session/BridgeSession.php')
-rw-r--r-- | plugins/session/BridgeSession.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/session/BridgeSession.php b/plugins/session/BridgeSession.php index d9c3afc..841622c 100644 --- a/plugins/session/BridgeSession.php +++ b/plugins/session/BridgeSession.php @@ -10,7 +10,7 @@ class BridgeSession extends EjabberdAuthBridge { $this->table = $config['mysql']['tablename']; $this->_isuser = $this->db->prepare(sprintf('SELECT COUNT(*) FROM `%s` WHERE `username` = :user AND `created` >= :limit;', $this->table)); $this->_auth = $this->db->prepare(sprintf('DELETE FROM `%s` WHERE `username` = :user AND `secret` = :secret AND `created` >= :limit;', $this->table)); - $this->_prune = $this->db->prepare(sprintf('DELETE COUNT(*) FROM `%s` WHERE `created` < :limit;', $this->table)); + $this->_prune = $this->db->prepare(sprintf('DELETE FROM `%s` WHERE `created` < :limit;', $this->table)); } function prune() { |