aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_jabber.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-01-05 16:10:10 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-01-05 16:10:10 +0000
commita7984e660da4def80d28a4efeacb5ee861c4718c (patch)
tree18c200ce69257f9611e9fa93ebf4154c4237278b /phpBB/includes/functions_jabber.php
parent1074925720e84bcb9f2b1b6908da805c132a1c8a (diff)
downloadforums-a7984e660da4def80d28a4efeacb5ee861c4718c.tar
forums-a7984e660da4def80d28a4efeacb5ee861c4718c.tar.gz
forums-a7984e660da4def80d28a4efeacb5ee861c4718c.tar.bz2
forums-a7984e660da4def80d28a4efeacb5ee861c4718c.tar.xz
forums-a7984e660da4def80d28a4efeacb5ee861c4718c.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/branches/phpBB-3_0_0@8306 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_jabber.php')
-rw-r--r--phpBB/includes/functions_jabber.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 8575f339c1..7633c10be9 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]))
{