Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
9f9e4ea0
Unverified
Commit
9f9e4ea0
authored
Sep 30, 2016
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-1198: Don't respond to responses of MUC non-occupants.
parent
0b0dc85e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
32 deletions
+13
-32
LocalMUCUser.java
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCUser.java
+13
-32
No files found.
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCUser.java
View file @
9f9e4ea0
...
@@ -20,43 +20,20 @@
...
@@ -20,43 +20,20 @@
package
org
.
jivesoftware
.
openfire
.
muc
.
spi
;
package
org
.
jivesoftware
.
openfire
.
muc
.
spi
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.dom4j.Element
;
import
org.dom4j.Element
;
import
org.dom4j.QName
;
import
org.jivesoftware.openfire.PacketException
;
import
org.jivesoftware.openfire.PacketException
;
import
org.jivesoftware.openfire.PacketRouter
;
import
org.jivesoftware.openfire.PacketRouter
;
import
org.jivesoftware.openfire.auth.UnauthorizedException
;
import
org.jivesoftware.openfire.auth.UnauthorizedException
;
import
org.jivesoftware.openfire.muc.CannotBeInvitedException
;
import
org.jivesoftware.openfire.muc.*
;
import
org.jivesoftware.openfire.muc.ConflictException
;
import
org.jivesoftware.openfire.muc.ForbiddenException
;
import
org.jivesoftware.openfire.muc.HistoryRequest
;
import
org.jivesoftware.openfire.muc.MUCRole
;
import
org.jivesoftware.openfire.muc.MUCRoom
;
import
org.jivesoftware.openfire.muc.MUCUser
;
import
org.jivesoftware.openfire.muc.MultiUserChatService
;
import
org.jivesoftware.openfire.muc.NotAcceptableException
;
import
org.jivesoftware.openfire.muc.NotAllowedException
;
import
org.jivesoftware.openfire.muc.RegistrationRequiredException
;
import
org.jivesoftware.openfire.muc.RoomLockedException
;
import
org.jivesoftware.openfire.muc.ServiceUnavailableException
;
import
org.jivesoftware.openfire.user.UserAlreadyExistsException
;
import
org.jivesoftware.openfire.user.UserAlreadyExistsException
;
import
org.jivesoftware.util.LocaleUtils
;
import
org.jivesoftware.util.LocaleUtils
;
import
org.jivesoftware.util.NotFoundException
;
import
org.jivesoftware.util.NotFoundException
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.xmpp.packet.IQ
;
import
org.xmpp.packet.*
;
import
org.xmpp.packet.JID
;
import
org.xmpp.packet.Message
;
import
java.util.*
;
import
org.xmpp.packet.Packet
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.xmpp.packet.PacketError
;
import
org.xmpp.packet.Presence
;
/**
/**
* Representation of users interacting with the chat service. A user
* Representation of users interacting with the chat service. A user
...
@@ -384,10 +361,14 @@ public class LocalMUCUser implements MUCUser {
...
@@ -384,10 +361,14 @@ public class LocalMUCUser implements MUCUser {
// Packets to a specific node/group/room
// Packets to a specific node/group/room
MUCRole
role
=
roles
.
get
(
group
);
MUCRole
role
=
roles
.
get
(
group
);
if
(
role
==
null
)
{
if
(
role
==
null
)
{
// If a non-occupant sends a disco to an address of the form <room@service/nick>,
Log
.
debug
(
"Ignoring stanza received from a non-occupant of '{}': {}"
,
group
,
packet
.
toXML
()
);
// a MUC service MUST return a <bad-request/> error.
if
(
packet
.
isRequest
()
)
// http://xmpp.org/extensions/xep-0045.html#disco-occupant
{
sendErrorPacket
(
packet
,
PacketError
.
Condition
.
bad_request
);
// If a non-occupant sends a disco to an address of the form <room@service/nick>,
// a MUC service MUST return a <bad-request/> error.
// http://xmpp.org/extensions/xep-0045.html#disco-occupant
sendErrorPacket
(
packet
,
PacketError
.
Condition
.
bad_request
);
}
}
}
else
if
(
IQ
.
Type
.
result
==
packet
.
getType
()
else
if
(
IQ
.
Type
.
result
==
packet
.
getType
()
||
IQ
.
Type
.
error
==
packet
.
getType
())
{
||
IQ
.
Type
.
error
==
packet
.
getType
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment