Skip to content

Tags: LoveDoLove/CS_CommonUtilities

Tags

v1.9.9

Toggle v1.9.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.9

* Refactor IpInfoHelper to use dual-stack endpoint

Updated IpInfoHelper to use the https://ipinfo.io/ dual-stack endpoint for retrieving IP information, supporting both IPv4 and IPv6 clients. Improved error handling, simplified client IP extraction logic, and added logging for failed requests.

* Bump version to 1.9.9 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.9 to prepare for a new release.

v1.9.8

Toggle v1.9.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.8

* Improve client IP extraction logic in IpInfoHelper

Enhanced GetClientIp to prioritize common proxy/CDN headers, handle multiple comma-separated IPs, and normalize IPv6 loopback and IPv4-mapped IPv6 addresses. This provides more accurate client IP detection in environments with proxies or load balancers.

* Bump version to 1.9.8 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.8 to prepare for a new release of the CommonUtilities library.

v1.9.7

Toggle v1.9.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.7

* Add IsValidLanguage method to LanguageHelper

Introduces IsValidLanguage to validate language code strings, allowing empty values and ensuring codes match known LanguageCodeType values in LanguageMappings. Also refactors GetLanguageName for improved clarity.

* Bump version to 1.9.7 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.7 to prepare for a new release.

v1.9.6

Toggle v1.9.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.6

* Add caller context to log messages in LoggerUtilities

Introduces stack inspection to prepend calling class and method names to log messages. This enhances log traceability by providing contextual information about the origin of each log entry. All logging methods now use the new FormatMessage helper to include this context.

* Replace LICENSE with full Apache 2.0 text

Updated the LICENSE file to include the complete Apache License, Version 2.0, replacing the previous abbreviated version. This provides full legal clarity and compliance with open source standards.

* Revise and expand README for clarity and structure

Improved the README with clearer usage instructions, updated feature lists, and reorganized sections for better readability. Added a project structure section, clarified configuration and installation steps, and streamlined contribution guidelines. Updated acknowledgments and removed outdated or redundant content.

* Bump version to 1.9.6 in project file

Updated AssemblyVersion and FileVersion in CommonUtilities.csproj from 1.9.5 to 1.9.6 to reflect new changes or release.

v1.9.5

Toggle v1.9.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.5

* Allow img tags and src/class attributes in HTML sanitizer

Updated HtmlSanitizerHelper to permit <img> tags and allow 'src' and 'class' attributes. Also clarified comments, ensured URI attributes include 'src', and improved post-processing for <a> tags to enforce rel policy. This enhances support for safe image embedding while maintaining XSS protection.

* Bump version to 1.9.5 in project file

Updated AssemblyVersion and FileVersion in CommonUtilities.csproj from 1.9.4 to 1.9.5 to prepare for a new release.

v1.9.4

Toggle v1.9.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.4

* Add HtmlSanitizerHelper for safe HTML input handling

Introduced HtmlSanitizerHelper to sanitize HTML-like input and prevent XSS attacks using a custom whitelist of tags and attributes. Added HtmlSanitizer package dependency to the project.

* Enhance HTML sanitizer with stricter policy

Refines the HTML sanitizer to use a more conservative whitelist of tags and attributes, restricts allowed URI schemes, forbids event and style attributes, and enforces rel="noopener noreferrer nofollow" on links. Improves newline handling and adds code comments for clarity.

* Bump version to 1.9.4 in project file

Updated AssemblyVersion and FileVersion in CommonUtilities.csproj from 1.9.3 to 1.9.4 to reflect the new release.

v1.9.3

Toggle v1.9.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.3

* Add Gemini grounding support and config options

Introduces Google Search grounding capabilities to GeminiHelper, including new config options for enabling grounding, setting thresholds, and choosing grounding mode. Updates IGeminiHelper interface and appsettings.json to support these features. Also refactors ImagenHelper for improved type safety.

* Bump version to 1.9.3 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.3 to reflect new release. No other changes made.

v1.9.2

Toggle v1.9.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.2

* Add Google.GenAI package to project

Included the Google.GenAI NuGet package (version 0.3.0) in CommonUtilities.csproj to enable integration with Google Generative AI features.

* Add Google Gemini and Imagen AI helpers

Introduces GeminiHelper and ImagenHelper classes with corresponding configuration and interface files for Google Generative AI integration. Updates project dependencies to use Google_GenerativeAI package. These helpers support text, chat, streaming, multimodal, and image generation features via Gemini and Imagen models.

* Bump version to 1.9.2 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.2 to prepare for a new release.

v1.9.1

Toggle v1.9.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.1

* Improve Dropbox OAuth2 refresh token documentation

Expanded comments in DropboxConfig and DropboxHelper to clarify the correct OAuth2 flow for obtaining and using refresh tokens. Added error handling for token refresh failures. Removed AccessToken from appsettings files, as it is now managed internally and refreshed automatically.

* Bump version to 1.9.1 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.1 to prepare for a new release.

v1.9.0

Toggle v1.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.9.0

* Add Dropbox OAuth2 refresh token support

Migrates Dropbox integration from static access tokens to OAuth2 refresh tokens for improved security and reliability. Updates DropboxConfig and appsettings.json to include refresh token, client ID, and client secret. DropboxHelper now automatically refreshes access tokens and caches them, ensuring valid authentication for all API calls. Also updates license headers to Apache 2.0.

* Change license from MIT to Apache 2.0

Replaces the MIT License text with the Apache License, Version 2.0. This updates the project's licensing terms and conditions.

* Switch license from MIT to Apache 2.0

Replaced the MIT license header with the Apache License, Version 2.0 in all source files. This change updates the legal terms under which the code is distributed and clarifies usage and warranty conditions.

* Bump version to 1.9.0 in CommonUtilities.csproj

Updated AssemblyVersion and FileVersion to 1.9.0 to prepare for a new release of the CommonUtilities library.