Gallery Server Pro - Fixed Defect Report
Version 2.4.7ID: 460
Defect:
Various functions do not work when viewStateEncryptionMode="Always"
Area: GSP Iteration: 2.4.7
Created: 24-Mar-11 State: Closed
Resolved: 08-Apr-11 Closed: 21-Apr-11
Issue Detail: The ComponentArt Callback control does not work when viewStateEncryptionMode is set to "Always" in
web.config. Specifically, one of these errors can occur:
(thumbnailview paging): "An error occurred while communicating with the server. Try again. Error: Invalid response from server."
(manage users/roles page): "The data could not be loaded."
Since this is a recommended best practice in terms of security and is also the new default setting in DotNetNuke 5.6.1 and higher, this must be addressed.
Resolution: Most usages of the Callback control were removed from the application.
thumbnailview.ascx - The paging function was converted to a traditional hyperlink-based navigation style. An UpdatePanel was considered, but there were issues with handling events from the linkbuttons in the pager control. Usage of jQuery's load() function was also considered, but this would require significant refactoring of the thumbnail and paging system.
manageusers.ascx - One of the Callback controls was replace with an UpdatePanel. Another one that verifies the user name, did not use PostState and so did not have to be replaced.
manageroles.ascx - The Callback control was replace with an UpdatePanel.
createaccount.ascx - This instance of the Callback control did not use PostState and so did not have to be replaced.
ID: 461
ID: 462
Defect:
Username not HTML encoded
Area: GSP Iteration: 2.4.7
Created: 08-Apr-11 State: Closed
Resolved: 08-Apr-11 Closed: 21-Apr-11
Issue Detail: The username is not HTML encoded in two cases:
1. In the album owner dropdown list on the edit album dialog. 2. In the username label on the 'My account' page.
Resolution: The username is now HTML encoded.
ID: 463
Defect:
Exception data of inner exception not logged
Area: GSP Iteration: 2.4.7
Created: 08-Apr-11 State: Closed
Resolved: 08-Apr-11 Closed: 21-Apr-11
Issue Detail: When the error handler logs an exception, it checks to see if it has an inner exception. If it does, it extracts
data from it. However, it fails to extract any items that may exist on the inner exception's Data property.
Resolution: Added code to the AppError constructor to log any data items on the inner exception. The class and table
ID: 464
Defect:
Possible NullReferenceException when gallery contains images with GPS metadata
Area: GSP Iteration: 2.4.7
Created: 08-Apr-11 State: Closed
Resolved: 08-Apr-11 Closed: 21-Apr-11
Issue Detail: GSP stores certain pieces of data in the user's session object, such as the host URL. In certain cases the
session object may not be available, which can cause the error shown below. Steps to reproduce:
* Add an image with GPS metadata to an album at least two levels deep. * Use a browser to open the Create album task page.
* Restart the IIS process. This deletes any session for the user.
* Expand the album node containing the image with the GPS metadata. The error shown below will occur. Message: System.Exception: Unhandled Error: ---> System.NullReferenceException: Object reference not set to an instance of an object. at GalleryServerPro.Web.Util.GetHostUrl() at
GalleryServerPro.Web.Controller.GalleryController.GetGpsMapUrl(IGalleryObject galleryObject, String latitude, String longitude, String gpsLocation) at
GalleryServerPro.Web.Controller.GalleryController.AddGpsLocationWithMapLink(IGalleryObject galleryObject, IMetadataDefinitionCollection metadataDisplaySettings) at
GalleryServerPro.Web.Controller.GalleryController.GalleryObjectMetadataLoaded(Object sender, EventArgs e) at GalleryServerPro.Business.GalleryObject.set_IsMetadataLoaded(Boolean value) at GalleryServerPro.Business.Factory.AddMediaObjectMetadata(IGalleryObject go) at
GalleryServerPro.Business.Factory.LoadMediaObjectInstance(IDataRecord dr, IAlbum parentAlbum) at GalleryServerPro.Business.Factory.AddChildObjects(IAlbum album) at
GalleryServerPro.Business.Factory.LoadAlbumInstance(IAlbum album, Boolean inflateChildMediaObjects) at GalleryServerPro.Business.Album.Inflate(Boolean inflateChildMediaObjects) at
GalleryServerPro.Business.Album.GetChildGalleryObjects() at
GalleryServerPro.Business.Album.GetChildGalleryObjects(Boolean sortBySequence, Boolean
excludePrivateObjects) at GalleryServerPro.Business.Album.GetChildGalleryObjects(GalleryObjectType galleryObjectType, Boolean sortBySequence, Boolean excludePrivateObjects) at
GalleryServerPro.Business.Album.GetChildGalleryObjects(GalleryObjectType galleryObjectType, Boolean sortBySequence) at GalleryServerPro.Business.Album.GetChildGalleryObjects(GalleryObjectType
galleryObjectType) at GalleryServerPro.Web.Handler.gettreeviewxml.GenerateTreeview() at GalleryServerPro.Web.Handler.gettreeviewxml.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execut e() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
ID: 466
Defect:
HTML snippet URL is incorrect when the website is installed in a virtual directory
Area: GSP Iteration: 2.4.7
Created: 18-Apr-11 State: Closed
Resolved: 20-Apr-11 Closed: 21-Apr-11
Issue Detail: The HTML snippet URL is generated by concatenating the host URL (e.g. http://www.site.com) with the
embed.aspx web page. This results in an incorrect URL for any gallery installed in a virtual directory.
Resolution: Modified how the URL to embed.aspx is generated so that it includes any virtual directories. To accomplish
this, I added a new method in Util.cs named GetAppUrl(): /// <summary>
/// Gets the URL to the current web application. Does not include the containing page or the trailing slash. /// Guaranteed to not return null. Example: If the gallery is installed in a virtual directory 'gallery'
/// on domain 'www.site.com', this returns 'http://www.site.com/gallery'. /// </summary>
/// <returns>Returns the URL to the current web application.</returns> public static string GetAppUrl()
{
return String.Concat(GetHostUrl(), AppRoot); }
ID: 467
Defect:
Role name that contains HTML cannot be assigned to user
Area: GSP Iteration: 2.4.7
Created: 20-Apr-11 State: Closed
Resolved: 20-Apr-11 Closed: 21-Apr-11
Issue Detail: A role name with HTML cannot be assigned to a user. Steps to repro:
1. Create a role name with HTML. Example: "my <b>new</b> role"
2. Using the Manage Users page, attempt to add a user assigned to this role. The following error appears: "Unable to create user. Role name not found."
ID: 468
Defect:
Cannot add/remove roles for user when membership is read-only
Area: GSP Iteration: 2.4.7
Created: 21-Apr-11 State: Closed
Resolved: 21-Apr-11 Closed: 21-Apr-11
Issue Detail: When the membership provider is read-only, an administrator is unable to update the user on the Manage
Users page. This is expected for membership-specific data such as e-mail address, comment, and approval status. However, the role membership is managed through the role provider, so an admin should be able to add and remove roles for a user even when membership is read-only.
This situation can commonly occur with Active Directory integration, as administrators may not want the gallery to have edit permission to the AD users.
Resolution: Modified UserController.UpdateUser() so that a call to Membership.UpdateUser is made only when
membership-specific data has changed (comment, email, and approval status). This will allow changes to role membership to succeed. Note that an administrator will continue to get an error when attempting to save membership-specific data when it is read-only.