From b0129b35f8dbe24b8e857223b3ac8ba4cb7cc830 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Jun 2010 12:37:16 -0700 Subject: Added checks to XInventory DB layer to truncate names and descriptions. --- OpenSim/Data/MySQL/MySQLXInventoryData.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 0fe801d..3c73095 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs @@ -64,14 +64,22 @@ namespace OpenSim.Data.MySQL public bool StoreFolder(XInventoryFolder folder) { + if (folder.folderName.Length > 64) + folder.folderName = folder.folderName.Substring(0, 64); + return m_Folders.Store(folder); } public bool StoreItem(XInventoryItem item) { + if (item.inventoryName.Length > 64) + item.inventoryName = item.inventoryName.Substring(0, 64); + if (item.inventoryDescription.Length > 128) + item.inventoryDescription = item.inventoryDescription.Substring(0, 128); + return m_Items.Store(item); } - + public bool DeleteFolders(string field, string val) { return m_Folders.Delete(field, val); -- cgit v1.1