HMI Client Allows the Creation of Folder Names That End with a Period (268138)



The information in this article applies to:

  • Microsoft Commercial Internet System 2.5

This article was previously published under Q268138

SYMPTOMS

The Microsoft Commercial Internet System (MCIS) HTML Mail Interface (HMI) allows users to create folders and rename existing folders with a period as the last character. Subsequently, you cannot access these folders in Windows Explorer, and the folders cannot be backed up. These folders can be deleted by using wildcards.

CAUSE

The rendering object DLL (Renobj.dll) does not check for the existence of a trailing period in the folder-name string that is supplied by the user.

WORKAROUND

To work around this problem, modify the two ASP files that call the rendering object DLL when a folder is created or renamed. The files that needs to be modified are named Createfolder.asp and Renamefolder.asp.

Replace the following section in Createfolder.asp:
   <%
   	dim bstrParent
   	dim bstrFolder
   	bstrParent = Request.QueryString("ParentFolder")
   	bstrFolder = Request.QueryString("FolderName")
   	Call Session("RenderingObject").CreateFolder(bstrParent, bstrFolder)
   %>
				
with:
   <%
   	dim bstrParent
   	dim bstrFolder
   	dim bstrTmp
   	dim intLen
   	bstrParent = Request.QueryString("ParentFolder")
   	bstrFolder = Request.QueryString("FolderName")
   	Do
   		bstrTmp = Right(bstrFolder, 1)
   		If bstrTmp <> "." Then
   			Exit Do
   		End If
   		intLen = Len(bstrFolder)
   		bstrTmp = Left(bstrFolder, intLen - 1)
   		bstrFolder = bstrTmp
   	Loop While intLen > 0
   	Call Session("RenderingObject").CreateFolder(bstrParent, bstrFolder) 
   %>
				
Also replace the following section in Renamefolder.asp:
   <% 
	dim bstrFldr
	dim bstrNewName

	bstrFldr = Request.QueryString("OldFolder")
	bstrNewName = Request.QueryString("FolderName")
	Call Session("RenderingObject").RenameFolder(bstrFldr, bstrNewName) 
   %>
				
with:
   <%
	dim bstrFldr
	dim bstrNewName
   	dim bstrTmp
   	dim intLen
	bstrFldr = Request.QueryString("OldFolder")
	bstrNewName = Request.QueryString("FolderName")
   	Do
   		bstrTmp = Right(bstrNewName, 1)
   		If bstrTmp <> "." Then
   			Exit Do
   		End If
   		intLen = Len(bstrNewName)
   		bstrTmp = Left(bstrNewName, intLen - 1)
   		bstrFolder = bstrTmp
   	Loop While intLen > 0
	Call Session("RenderingObject").RenameFolder(bstrFldr, bstrNewName) 
   %>
				
This prevents the creation of folders with trailing periods.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Commercial Internet System 2.5.

MORE INFORMATION


Modification Type:MajorLast Reviewed:10/2/2003
Keywords:kbprb KB268138