Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Version 2.64

Latest
Compare
Choose a tag to compare
@RickStrahl RickStrahl released this 20 May 22:02
· 107 commits to master since this release
  • JsonVariables prevent XSS by encoding < and > in JSON
    Westwind.Web
    The JsonVariables utility that allows embedding of server side data into client script has been updated to generate < and > tags as encoded strings to prevent XSS attacks when rendering.
  • CallbackHandler improved JSON.NET Suppport
    Westwind.Web
    Switched to hard linked JSON.NET support in CallbackHandler instead of the previous dynamic loading to avoid the assembly reference to JSON.NET. This fixes odd version incompatibilities that have been reported as well as improving JSON performance slightly.
  • Add Async Support for HttpClient
    Westwind.Utilities
    Added support for Async methods to the HttpClient Class for DownloadBytesAsync() and DownloadStringAsync(). Also optimized throughput and fixed explicit disposal of one of the internal streams that previously slowed down high volume requests.
  • ImageUtils.NormalizeJpgImageRotation
    Westwind.Utilities
    Method that looks at Exif Orientation data in a jpeg file and rotates the image to match the orientation before removing the Exif data. Useful when capturing images from mobile device which often are natively rotated and contain.
  • ImageUtils.StripJgpExifData
    Westwind.Utilities
    Removes Exif data from Jpg images. Helps reduce size of images and normalizes images and keeps them from auto-rotating.
  • CallbackExceptionHandlerAttribute for MVC Controllers
    Westwind.Web.Mvc
    Added CallbackExceptionHandlerAttribute to make it easy to throw
    CallbackException objects and have those exception objects handled
    and returned as JSON errors with appropriate HTTP status codes. Simplifies
    explicit application error responses to clients. Handler also captures
    other exceptions but as generic 500 errors using consistent format.
  • CallbackResponseMessage and CallbackErrorResponseMessage Classes for JSON Results
    Westwind.Web.Mvc
    Added explicit CallbackErrorResponseMessage and CallbackResponseMessage
    classes responsible for returning properly JSON formatted message to clients.
    Used to return error results from JSON callbacks in a consistent manner with
    a isError flag used to determine error status. Works in conjunction with
    CallbackException() in CallbackHandler implementation and in MVC BaseController.
  • AppConfiguration ConfigurationFileConfigurationProvider Property Only Serialization
    Westwind.Utilities

    Changed behavior of the Config file configuration provider to only serialize/deserialize properties. Originally both properties and fields were serialized, but in light of all the other serializers only working with properties removed the field serialization feature. This also makes it easier to create non-serialized fields that might still have to be externally visible to other classes which caused a number of reported issues in the past.