diff options
author | Adam Frisby | 2009-04-08 06:41:52 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-08 06:41:52 +0000 |
commit | 5118f88bc40e98b63a5b36639fa20880846b3a7f (patch) | |
tree | 3d2720e16a78e135a89484b55a5975e2bf3b3c6a /OpenSim | |
parent | * [SECURITY] Implements a large number of new security checks into Scene/Avat... (diff) | |
download | opensim-SC-5118f88bc40e98b63a5b36639fa20880846b3a7f.zip opensim-SC-5118f88bc40e98b63a5b36639fa20880846b3a7f.tar.gz opensim-SC-5118f88bc40e98b63a5b36639fa20880846b3a7f.tar.bz2 opensim-SC-5118f88bc40e98b63a5b36639fa20880846b3a7f.tar.xz |
* [SECURITY] Implements additional packet security checks for Object related packets.
* Note: as with the last commit, this requires additional testing.
* This represents 2/8ths of packets now being checked appropriately.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 250 |
1 files changed, 250 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f735aa7..70ca375 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5269,6 +5269,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5269 | 5269 | ||
5270 | case PacketType.ObjectLink: | 5270 | case PacketType.ObjectLink: |
5271 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; | 5271 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; |
5272 | |||
5273 | #region Packet Session and User Check | ||
5274 | if (m_checkPackets) | ||
5275 | { | ||
5276 | if (link.AgentData.SessionID != SessionId || | ||
5277 | link.AgentData.AgentID != AgentId) | ||
5278 | break; | ||
5279 | } | ||
5280 | #endregion | ||
5281 | |||
5272 | uint parentprimid = 0; | 5282 | uint parentprimid = 0; |
5273 | List<uint> childrenprims = new List<uint>(); | 5283 | List<uint> childrenprims = new List<uint>(); |
5274 | if (link.ObjectData.Length > 1) | 5284 | if (link.ObjectData.Length > 1) |
@@ -5290,6 +5300,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5290 | case PacketType.ObjectDelink: | 5300 | case PacketType.ObjectDelink: |
5291 | ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack; | 5301 | ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack; |
5292 | 5302 | ||
5303 | #region Packet Session and User Check | ||
5304 | if (m_checkPackets) | ||
5305 | { | ||
5306 | if (delink.AgentData.SessionID != SessionId || | ||
5307 | delink.AgentData.AgentID != AgentId) | ||
5308 | break; | ||
5309 | } | ||
5310 | #endregion | ||
5311 | |||
5293 | // It appears the prim at index 0 is not always the root prim (for | 5312 | // It appears the prim at index 0 is not always the root prim (for |
5294 | // instance, when one prim of a link set has been edited independently | 5313 | // instance, when one prim of a link set has been edited independently |
5295 | // of the others). Therefore, we'll pass all the ids onto the delink | 5314 | // of the others). Therefore, we'll pass all the ids onto the delink |
@@ -5311,6 +5330,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5311 | if (OnAddPrim != null) | 5330 | if (OnAddPrim != null) |
5312 | { | 5331 | { |
5313 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; | 5332 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; |
5333 | |||
5334 | #region Packet Session and User Check | ||
5335 | if (m_checkPackets) | ||
5336 | { | ||
5337 | if (addPacket.AgentData.SessionID != SessionId || | ||
5338 | addPacket.AgentData.AgentID != AgentId) | ||
5339 | break; | ||
5340 | } | ||
5341 | #endregion | ||
5342 | |||
5314 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); | 5343 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); |
5315 | // m_log.Info("[REZData]: " + addPacket.ToString()); | 5344 | // m_log.Info("[REZData]: " + addPacket.ToString()); |
5316 | //BypassRaycast: 1 | 5345 | //BypassRaycast: 1 |
@@ -5329,6 +5358,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5329 | 5358 | ||
5330 | case PacketType.ObjectShape: | 5359 | case PacketType.ObjectShape: |
5331 | ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; | 5360 | ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; |
5361 | |||
5362 | #region Packet Session and User Check | ||
5363 | if (m_checkPackets) | ||
5364 | { | ||
5365 | if (shapePacket.AgentData.SessionID != SessionId || | ||
5366 | shapePacket.AgentData.AgentID != AgentId) | ||
5367 | break; | ||
5368 | } | ||
5369 | #endregion | ||
5370 | |||
5332 | handlerUpdatePrimShape = null; | 5371 | handlerUpdatePrimShape = null; |
5333 | for (int i = 0; i < shapePacket.ObjectData.Length; i++) | 5372 | for (int i = 0; i < shapePacket.ObjectData.Length; i++) |
5334 | { | 5373 | { |
@@ -5365,6 +5404,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5365 | case PacketType.ObjectExtraParams: | 5404 | case PacketType.ObjectExtraParams: |
5366 | ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; | 5405 | ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; |
5367 | 5406 | ||
5407 | #region Packet Session and User Check | ||
5408 | if (m_checkPackets) | ||
5409 | { | ||
5410 | if (extraPar.AgentData.SessionID != SessionId || | ||
5411 | extraPar.AgentData.AgentID != AgentId) | ||
5412 | break; | ||
5413 | } | ||
5414 | #endregion | ||
5415 | |||
5368 | handlerUpdateExtraParams = OnUpdateExtraParams; | 5416 | handlerUpdateExtraParams = OnUpdateExtraParams; |
5369 | if (handlerUpdateExtraParams != null) | 5417 | if (handlerUpdateExtraParams != null) |
5370 | { | 5418 | { |
@@ -5375,6 +5423,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5375 | break; | 5423 | break; |
5376 | case PacketType.ObjectDuplicate: | 5424 | case PacketType.ObjectDuplicate: |
5377 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; | 5425 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; |
5426 | |||
5427 | #region Packet Session and User Check | ||
5428 | if (m_checkPackets) | ||
5429 | { | ||
5430 | if (dupe.AgentData.SessionID != SessionId || | ||
5431 | dupe.AgentData.AgentID != AgentId) | ||
5432 | break; | ||
5433 | } | ||
5434 | #endregion | ||
5435 | |||
5378 | ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; | 5436 | ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; |
5379 | 5437 | ||
5380 | handlerObjectDuplicate = null; | 5438 | handlerObjectDuplicate = null; |
@@ -5395,6 +5453,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5395 | case PacketType.ObjectSelect: | 5453 | case PacketType.ObjectSelect: |
5396 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; | 5454 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; |
5397 | 5455 | ||
5456 | #region Packet Session and User Check | ||
5457 | if (m_checkPackets) | ||
5458 | { | ||
5459 | if (incomingselect.AgentData.SessionID != SessionId || | ||
5460 | incomingselect.AgentData.AgentID != AgentId) | ||
5461 | break; | ||
5462 | } | ||
5463 | #endregion | ||
5464 | |||
5398 | handlerObjectSelect = null; | 5465 | handlerObjectSelect = null; |
5399 | 5466 | ||
5400 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) | 5467 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) |
@@ -5409,6 +5476,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5409 | case PacketType.ObjectDeselect: | 5476 | case PacketType.ObjectDeselect: |
5410 | ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; | 5477 | ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; |
5411 | 5478 | ||
5479 | #region Packet Session and User Check | ||
5480 | if (m_checkPackets) | ||
5481 | { | ||
5482 | if (incomingdeselect.AgentData.SessionID != SessionId || | ||
5483 | incomingdeselect.AgentData.AgentID != AgentId) | ||
5484 | break; | ||
5485 | } | ||
5486 | #endregion | ||
5487 | |||
5412 | handlerObjectDeselect = null; | 5488 | handlerObjectDeselect = null; |
5413 | 5489 | ||
5414 | for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) | 5490 | for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) |
@@ -5424,6 +5500,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5424 | // DEPRECATED: but till libsecondlife removes it, people will use it | 5500 | // DEPRECATED: but till libsecondlife removes it, people will use it |
5425 | ObjectPositionPacket position = (ObjectPositionPacket)Pack; | 5501 | ObjectPositionPacket position = (ObjectPositionPacket)Pack; |
5426 | 5502 | ||
5503 | #region Packet Session and User Check | ||
5504 | if (m_checkPackets) | ||
5505 | { | ||
5506 | if (position.AgentData.SessionID != SessionId || | ||
5507 | position.AgentData.AgentID != AgentId) | ||
5508 | break; | ||
5509 | } | ||
5510 | #endregion | ||
5511 | |||
5512 | |||
5427 | for (int i = 0; i < position.ObjectData.Length; i++) | 5513 | for (int i = 0; i < position.ObjectData.Length; i++) |
5428 | { | 5514 | { |
5429 | handlerUpdateVector = OnUpdatePrimGroupPosition; | 5515 | handlerUpdateVector = OnUpdatePrimGroupPosition; |
@@ -5436,6 +5522,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5436 | // DEPRECATED: but till libsecondlife removes it, people will use it | 5522 | // DEPRECATED: but till libsecondlife removes it, people will use it |
5437 | ObjectScalePacket scale = (ObjectScalePacket)Pack; | 5523 | ObjectScalePacket scale = (ObjectScalePacket)Pack; |
5438 | 5524 | ||
5525 | #region Packet Session and User Check | ||
5526 | if (m_checkPackets) | ||
5527 | { | ||
5528 | if (scale.AgentData.SessionID != SessionId || | ||
5529 | scale.AgentData.AgentID != AgentId) | ||
5530 | break; | ||
5531 | } | ||
5532 | #endregion | ||
5533 | |||
5439 | for (int i = 0; i < scale.ObjectData.Length; i++) | 5534 | for (int i = 0; i < scale.ObjectData.Length; i++) |
5440 | { | 5535 | { |
5441 | handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; | 5536 | handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; |
@@ -5448,6 +5543,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5448 | // DEPRECATED: but till libsecondlife removes it, people will use it | 5543 | // DEPRECATED: but till libsecondlife removes it, people will use it |
5449 | ObjectRotationPacket rotation = (ObjectRotationPacket)Pack; | 5544 | ObjectRotationPacket rotation = (ObjectRotationPacket)Pack; |
5450 | 5545 | ||
5546 | #region Packet Session and User Check | ||
5547 | if (m_checkPackets) | ||
5548 | { | ||
5549 | if (rotation.AgentData.SessionID != SessionId || | ||
5550 | rotation.AgentData.AgentID != AgentId) | ||
5551 | break; | ||
5552 | } | ||
5553 | #endregion | ||
5554 | |||
5451 | for (int i = 0; i < rotation.ObjectData.Length; i++) | 5555 | for (int i = 0; i < rotation.ObjectData.Length; i++) |
5452 | { | 5556 | { |
5453 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; | 5557 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; |
@@ -5459,6 +5563,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5459 | case PacketType.ObjectFlagUpdate: | 5563 | case PacketType.ObjectFlagUpdate: |
5460 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; | 5564 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; |
5461 | 5565 | ||
5566 | #region Packet Session and User Check | ||
5567 | if (m_checkPackets) | ||
5568 | { | ||
5569 | if (flags.AgentData.SessionID != SessionId || | ||
5570 | flags.AgentData.AgentID != AgentId) | ||
5571 | break; | ||
5572 | } | ||
5573 | #endregion | ||
5574 | |||
5462 | handlerUpdatePrimFlags = OnUpdatePrimFlags; | 5575 | handlerUpdatePrimFlags = OnUpdatePrimFlags; |
5463 | 5576 | ||
5464 | if (handlerUpdatePrimFlags != null) | 5577 | if (handlerUpdatePrimFlags != null) |
@@ -5490,6 +5603,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5490 | case PacketType.ObjectGrab: | 5603 | case PacketType.ObjectGrab: |
5491 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; | 5604 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; |
5492 | 5605 | ||
5606 | #region Packet Session and User Check | ||
5607 | if (m_checkPackets) | ||
5608 | { | ||
5609 | if (grab.AgentData.SessionID != SessionId || | ||
5610 | grab.AgentData.AgentID != AgentId) | ||
5611 | break; | ||
5612 | } | ||
5613 | #endregion | ||
5614 | |||
5493 | handlerGrabObject = OnGrabObject; | 5615 | handlerGrabObject = OnGrabObject; |
5494 | 5616 | ||
5495 | if (handlerGrabObject != null) | 5617 | if (handlerGrabObject != null) |
@@ -5515,6 +5637,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5515 | case PacketType.ObjectGrabUpdate: | 5637 | case PacketType.ObjectGrabUpdate: |
5516 | ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; | 5638 | ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; |
5517 | 5639 | ||
5640 | #region Packet Session and User Check | ||
5641 | if (m_checkPackets) | ||
5642 | { | ||
5643 | if (grabUpdate.AgentData.SessionID != SessionId || | ||
5644 | grabUpdate.AgentData.AgentID != AgentId) | ||
5645 | break; | ||
5646 | } | ||
5647 | #endregion | ||
5648 | |||
5518 | handlerGrabUpdate = OnGrabUpdate; | 5649 | handlerGrabUpdate = OnGrabUpdate; |
5519 | 5650 | ||
5520 | if (handlerGrabUpdate != null) | 5651 | if (handlerGrabUpdate != null) |
@@ -5541,6 +5672,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5541 | case PacketType.ObjectDeGrab: | 5672 | case PacketType.ObjectDeGrab: |
5542 | ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; | 5673 | ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; |
5543 | 5674 | ||
5675 | #region Packet Session and User Check | ||
5676 | if (m_checkPackets) | ||
5677 | { | ||
5678 | if (deGrab.AgentData.SessionID != SessionId || | ||
5679 | deGrab.AgentData.AgentID != AgentId) | ||
5680 | break; | ||
5681 | } | ||
5682 | #endregion | ||
5683 | |||
5544 | handlerDeGrabObject = OnDeGrabObject; | 5684 | handlerDeGrabObject = OnDeGrabObject; |
5545 | if (handlerDeGrabObject != null) | 5685 | if (handlerDeGrabObject != null) |
5546 | { | 5686 | { |
@@ -5551,6 +5691,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5551 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet"); | 5691 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet"); |
5552 | ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; | 5692 | ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; |
5553 | 5693 | ||
5694 | #region Packet Session and User Check | ||
5695 | if (m_checkPackets) | ||
5696 | { | ||
5697 | if (spinStart.AgentData.SessionID != SessionId || | ||
5698 | spinStart.AgentData.AgentID != AgentId) | ||
5699 | break; | ||
5700 | } | ||
5701 | #endregion | ||
5702 | |||
5554 | handlerSpinStart = OnSpinStart; | 5703 | handlerSpinStart = OnSpinStart; |
5555 | if (handlerSpinStart != null) | 5704 | if (handlerSpinStart != null) |
5556 | { | 5705 | { |
@@ -5560,6 +5709,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5560 | case PacketType.ObjectSpinUpdate: | 5709 | case PacketType.ObjectSpinUpdate: |
5561 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinUpdate packet"); | 5710 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinUpdate packet"); |
5562 | ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack; | 5711 | ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack; |
5712 | |||
5713 | #region Packet Session and User Check | ||
5714 | if (m_checkPackets) | ||
5715 | { | ||
5716 | if (spinUpdate.AgentData.SessionID != SessionId || | ||
5717 | spinUpdate.AgentData.AgentID != AgentId) | ||
5718 | break; | ||
5719 | } | ||
5720 | #endregion | ||
5721 | |||
5563 | Vector3 axis; | 5722 | Vector3 axis; |
5564 | float angle; | 5723 | float angle; |
5565 | spinUpdate.ObjectData.Rotation.GetAxisAngle(out axis, out angle); | 5724 | spinUpdate.ObjectData.Rotation.GetAxisAngle(out axis, out angle); |
@@ -5575,6 +5734,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5575 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); | 5734 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); |
5576 | ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; | 5735 | ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; |
5577 | 5736 | ||
5737 | #region Packet Session and User Check | ||
5738 | if (m_checkPackets) | ||
5739 | { | ||
5740 | if (spinStop.AgentData.SessionID != SessionId || | ||
5741 | spinStop.AgentData.AgentID != AgentId) | ||
5742 | break; | ||
5743 | } | ||
5744 | #endregion | ||
5745 | |||
5578 | handlerSpinStop = OnSpinStop; | 5746 | handlerSpinStop = OnSpinStop; |
5579 | if (handlerSpinStop != null) | 5747 | if (handlerSpinStop != null) |
5580 | { | 5748 | { |
@@ -5585,6 +5753,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5585 | case PacketType.ObjectDescription: | 5753 | case PacketType.ObjectDescription: |
5586 | ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; | 5754 | ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; |
5587 | 5755 | ||
5756 | #region Packet Session and User Check | ||
5757 | if (m_checkPackets) | ||
5758 | { | ||
5759 | if (objDes.AgentData.SessionID != SessionId || | ||
5760 | objDes.AgentData.AgentID != AgentId) | ||
5761 | break; | ||
5762 | } | ||
5763 | #endregion | ||
5764 | |||
5588 | handlerObjectDescription = null; | 5765 | handlerObjectDescription = null; |
5589 | 5766 | ||
5590 | for (int i = 0; i < objDes.ObjectData.Length; i++) | 5767 | for (int i = 0; i < objDes.ObjectData.Length; i++) |
@@ -5616,6 +5793,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5616 | { | 5793 | { |
5617 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; | 5794 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; |
5618 | 5795 | ||
5796 | #region Packet Session and User Check | ||
5797 | if (m_checkPackets) | ||
5798 | { | ||
5799 | if (newobjPerms.AgentData.SessionID != SessionId || | ||
5800 | newobjPerms.AgentData.AgentID != AgentId) | ||
5801 | break; | ||
5802 | } | ||
5803 | #endregion | ||
5804 | |||
5619 | UUID AgentID = newobjPerms.AgentData.AgentID; | 5805 | UUID AgentID = newobjPerms.AgentData.AgentID; |
5620 | UUID SessionID = newobjPerms.AgentData.SessionID; | 5806 | UUID SessionID = newobjPerms.AgentData.SessionID; |
5621 | 5807 | ||
@@ -5653,6 +5839,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5653 | 5839 | ||
5654 | case PacketType.Undo: | 5840 | case PacketType.Undo: |
5655 | UndoPacket undoitem = (UndoPacket)Pack; | 5841 | UndoPacket undoitem = (UndoPacket)Pack; |
5842 | |||
5843 | #region Packet Session and User Check | ||
5844 | if (m_checkPackets) | ||
5845 | { | ||
5846 | if (undoitem.AgentData.SessionID != SessionId || | ||
5847 | undoitem.AgentData.AgentID != AgentId) | ||
5848 | break; | ||
5849 | } | ||
5850 | #endregion | ||
5851 | |||
5656 | if (undoitem.ObjectData.Length > 0) | 5852 | if (undoitem.ObjectData.Length > 0) |
5657 | { | 5853 | { |
5658 | for (int i = 0; i < undoitem.ObjectData.Length; i++) | 5854 | for (int i = 0; i < undoitem.ObjectData.Length; i++) |
@@ -5670,6 +5866,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5670 | case PacketType.ObjectDuplicateOnRay: | 5866 | case PacketType.ObjectDuplicateOnRay: |
5671 | ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack; | 5867 | ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack; |
5672 | 5868 | ||
5869 | #region Packet Session and User Check | ||
5870 | if (m_checkPackets) | ||
5871 | { | ||
5872 | if (dupeOnRay.AgentData.SessionID != SessionId || | ||
5873 | dupeOnRay.AgentData.AgentID != AgentId) | ||
5874 | break; | ||
5875 | } | ||
5876 | #endregion | ||
5877 | |||
5673 | handlerObjectDuplicateOnRay = null; | 5878 | handlerObjectDuplicateOnRay = null; |
5674 | 5879 | ||
5675 | 5880 | ||
@@ -5690,6 +5895,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5690 | //This powers the little tooltip that appears when you move your mouse over an object | 5895 | //This powers the little tooltip that appears when you move your mouse over an object |
5691 | RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; | 5896 | RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; |
5692 | 5897 | ||
5898 | #region Packet Session and User Check | ||
5899 | if (m_checkPackets) | ||
5900 | { | ||
5901 | if (packToolTip.AgentData.SessionID != SessionId || | ||
5902 | packToolTip.AgentData.AgentID != AgentId) | ||
5903 | break; | ||
5904 | } | ||
5905 | #endregion | ||
5906 | |||
5693 | RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; | 5907 | RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; |
5694 | 5908 | ||
5695 | handlerRequestObjectPropertiesFamily = OnRequestObjectPropertiesFamily; | 5909 | handlerRequestObjectPropertiesFamily = OnRequestObjectPropertiesFamily; |
@@ -5706,6 +5920,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5706 | ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack; | 5920 | ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack; |
5707 | handlerObjectIncludeInSearch = null; | 5921 | handlerObjectIncludeInSearch = null; |
5708 | 5922 | ||
5923 | #region Packet Session and User Check | ||
5924 | if (m_checkPackets) | ||
5925 | { | ||
5926 | if (packInSearch.AgentData.SessionID != SessionId || | ||
5927 | packInSearch.AgentData.AgentID != AgentId) | ||
5928 | break; | ||
5929 | } | ||
5930 | #endregion | ||
5931 | |||
5709 | foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData) | 5932 | foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData) |
5710 | { | 5933 | { |
5711 | bool inSearch = objData.IncludeInSearch; | 5934 | bool inSearch = objData.IncludeInSearch; |
@@ -5723,6 +5946,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5723 | case PacketType.ScriptAnswerYes: | 5946 | case PacketType.ScriptAnswerYes: |
5724 | ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack; | 5947 | ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack; |
5725 | 5948 | ||
5949 | #region Packet Session and User Check | ||
5950 | if (m_checkPackets) | ||
5951 | { | ||
5952 | if (scriptAnswer.AgentData.SessionID != SessionId || | ||
5953 | scriptAnswer.AgentData.AgentID != AgentId) | ||
5954 | break; | ||
5955 | } | ||
5956 | #endregion | ||
5957 | |||
5726 | handlerScriptAnswer = OnScriptAnswer; | 5958 | handlerScriptAnswer = OnScriptAnswer; |
5727 | if (handlerScriptAnswer != null) | 5959 | if (handlerScriptAnswer != null) |
5728 | { | 5960 | { |
@@ -5733,6 +5965,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5733 | case PacketType.ObjectClickAction: | 5965 | case PacketType.ObjectClickAction: |
5734 | ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack; | 5966 | ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack; |
5735 | 5967 | ||
5968 | #region Packet Session and User Check | ||
5969 | if (m_checkPackets) | ||
5970 | { | ||
5971 | if (ocpacket.AgentData.SessionID != SessionId || | ||
5972 | ocpacket.AgentData.AgentID != AgentId) | ||
5973 | break; | ||
5974 | } | ||
5975 | #endregion | ||
5976 | |||
5736 | handlerObjectClickAction = OnObjectClickAction; | 5977 | handlerObjectClickAction = OnObjectClickAction; |
5737 | if (handlerObjectClickAction != null) | 5978 | if (handlerObjectClickAction != null) |
5738 | { | 5979 | { |
@@ -5748,6 +5989,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5748 | case PacketType.ObjectMaterial: | 5989 | case PacketType.ObjectMaterial: |
5749 | ObjectMaterialPacket ompacket = (ObjectMaterialPacket)Pack; | 5990 | ObjectMaterialPacket ompacket = (ObjectMaterialPacket)Pack; |
5750 | 5991 | ||
5992 | #region Packet Session and User Check | ||
5993 | if (m_checkPackets) | ||
5994 | { | ||
5995 | if (ompacket.AgentData.SessionID != SessionId || | ||
5996 | ompacket.AgentData.AgentID != AgentId) | ||
5997 | break; | ||
5998 | } | ||
5999 | #endregion | ||
6000 | |||
5751 | handlerObjectMaterial = OnObjectMaterial; | 6001 | handlerObjectMaterial = OnObjectMaterial; |
5752 | if (handlerObjectMaterial != null) | 6002 | if (handlerObjectMaterial != null) |
5753 | { | 6003 | { |