aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/HypergridService/HGAssetService.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index a829932..b83fb1e 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -129,6 +129,14 @@ namespace OpenSim.Services.HypergridService
129 if (!m_AssetPerms.AllowedExport(asset.Type)) 129 if (!m_AssetPerms.AllowedExport(asset.Type))
130 return null; 130 return null;
131 131
132 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8)
133 // Fix bad assets before sending them elsewhere
134 if (asset.Type == (int)AssetType.Object && asset.Data != null)
135 {
136 string xml = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(asset.Data));
137 asset.Data = Utils.StringToBytes(xml);
138 }
139
132 return asset.Data; 140 return asset.Data;
133 } 141 }
134 142
@@ -139,6 +147,14 @@ namespace OpenSim.Services.HypergridService
139 if (!m_AssetPerms.AllowedImport(asset.Type)) 147 if (!m_AssetPerms.AllowedImport(asset.Type))
140 return string.Empty; 148 return string.Empty;
141 149
150 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8)
151 // Fix bad assets before storing on this server
152 if (asset.Type == (int)AssetType.Object && asset.Data != null)
153 {
154 string xml = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(asset.Data));
155 asset.Data = Utils.StringToBytes(xml);
156 }
157
142 return base.Store(asset); 158 return base.Store(asset);
143 } 159 }
144 160
@@ -160,9 +176,15 @@ namespace OpenSim.Services.HypergridService
160 meta.CreatorID = meta.CreatorID + ";" + m_HomeURL + "/" + creator.FirstName + " " + creator.LastName; 176 meta.CreatorID = meta.CreatorID + ";" + m_HomeURL + "/" + creator.FirstName + " " + creator.LastName;
161 } 177 }
162 178
179 // Only for Object
163 protected byte[] AdjustIdentifiers(byte[] data) 180 protected byte[] AdjustIdentifiers(byte[] data)
164 { 181 {
165 string xml = Utils.BytesToString(data); 182 string xml = Utils.BytesToString(data);
183
184 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8)
185 // Fix bad assets before sending them elsewhere
186 xml = ExternalRepresentationUtils.SanitizeXml(xml);
187
166 return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, "HGAssetService", m_HomeURL, m_Cache, UUID.Zero)); 188 return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, "HGAssetService", m_HomeURL, m_Cache, UUID.Zero));
167 } 189 }
168 190