diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-01-05 16:10:10 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-01-05 16:10:10 +0000 |
commit | f0dea060972a48460ce64d3cdf885d82383763c6 (patch) | |
tree | 8ae56525469a3c62b35d14f38375554acbf7f1e3 /phpBB/includes/functions_jabber.php | |
parent | a4633d8ac09f50aceb9e5568baff59de61508bc8 (diff) | |
download | forums-f0dea060972a48460ce64d3cdf885d82383763c6.tar forums-f0dea060972a48460ce64d3cdf885d82383763c6.tar.gz forums-f0dea060972a48460ce64d3cdf885d82383763c6.tar.bz2 forums-f0dea060972a48460ce64d3cdf885d82383763c6.tar.xz forums-f0dea060972a48460ce64d3cdf885d82383763c6.zip |
Correctly check empty subjects/messages (Bug #17915)
Do not check usernames against word censor list. Disallowed usernames is already checked and word censor belong to posts. (Bug #17745)
Additionally include non-postable forums for moderators forums shown within the teams list. (Bug #17265)
git-svn-id: file:///svn/phpbb/trunk@8306 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_jabber.php')
-rw-r--r-- | phpBB/includes/functions_jabber.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php index e8bd3d423e..72dbbd2869 100644 --- a/phpBB/includes/functions_jabber.php +++ b/phpBB/includes/functions_jabber.php @@ -20,11 +20,11 @@ if (!defined('IN_PHPBB')) * * Jabber class from Flyspray project * -* @version class.jabber2.php 1306 2007-06-21 +* @version class.jabber2.php 1488 2007-11-25 * @copyright 2006 Flyspray.org * @author Florian Schmitz (floele) * -* Modified by Acyd Burn +* Only slightly modified by Acyd Burn * * @package phpBB3 */ @@ -286,7 +286,7 @@ class jabber $read = trim(fread($this->connection, 4096)); $data .= $read; } - while (time() <= $start + $timeout && ($wait || $data == '' || $read != '' || (substr(rtrim($data), -1) != '>'))); + while (time() <= $start + $timeout && !feof($this->connection) && ($wait || $data == '' || $read != '' || (substr(rtrim($data), -1) != '>'))); if ($data != '') { @@ -385,7 +385,6 @@ class jabber { case 'stream:stream': // Connection initialised (or after authentication). Not much to do here... - $this->session['id'] = $xml['stream:stream'][0]['@']['id']; if (isset($xml['stream:stream'][0]['#']['stream:features'])) { @@ -397,6 +396,16 @@ class jabber $this->features = $this->listen(); } + $second_time = isset($this->session['id']); + $this->session['id'] = $xml['stream:stream'][0]['@']['id']; + + if ($second_time) + { + // If we are here for the second time after TLS, we need to continue logging in + $this->login(); + return; + } + // go on with authentication? if (isset($this->features['stream:features'][0]['#']['bind']) || !empty($this->session['tls'])) { @@ -519,9 +528,10 @@ class jabber 'response' => $this->encrypt_password(array_merge($decoded, array('nc' => '00000001'))), 'charset' => 'utf-8', 'nc' => '00000001', + 'qop' => 'auth', // only auth being supported ); - foreach (array('nonce', 'qop', 'digest-uri', 'realm', 'cnonce') as $key) + foreach (array('nonce', 'digest-uri', 'realm', 'cnonce') as $key) { if (isset($decoded[$key])) { |