From 80a160be5177d76855af4a8300626a92216809f8 Mon Sep 17 00:00:00 2001 From: Pravin Barton <9560941+isc-pbarton@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:13:21 -0500 Subject: [PATCH 1/2] fix: need to convert UTF encoding of CSP stream before JSON input --- CHANGELOG.md | 5 +++++ cls/SourceControl/Git/WebUIDriver.cls | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e10575fd..af10a64b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.8.0] - Unreleased + +### Fixed +- Fixed improper encoding of unicode characters in commit messages (#627) + ## [2.7.0] - 2024-11-04 ### Added diff --git a/cls/SourceControl/Git/WebUIDriver.cls b/cls/SourceControl/Git/WebUIDriver.cls index 38388f16..fe91feb8 100644 --- a/cls/SourceControl/Git/WebUIDriver.cls +++ b/cls/SourceControl/Git/WebUIDriver.cls @@ -244,7 +244,12 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out } set handled = 1 } elseif (pathStart = "git-command") { - set requestBody = ##class(%Library.DynamicObject).%FromJSON(%request.Content) + set stringBody = "" + while '%request.Content.AtEnd { + set stringBody = stringBody _ %request.Content.Read() + } + set stringBody = $zconvert(stringBody,"I","UTF8") + set requestBody = ##class(%Library.DynamicObject).%FromJSON(stringBody) set command = requestBody.command set gitCmd = command.%Get(0) From 4cb780321abb0a42dd633b22e47dc1d3a99682c0 Mon Sep 17 00:00:00 2001 From: Pravin Barton <9560941+isc-pbarton@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:33:25 -0500 Subject: [PATCH 2/2] chore: fix version in changelog and manifest --- CHANGELOG.md | 2 +- module.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af10a64b..4236c4d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.8.0] - Unreleased +## [2.7.1] - Unreleased ### Fixed - Fixed improper encoding of unicode characters in commit messages (#627) diff --git a/module.xml b/module.xml index 44732e13..8da8cfcf 100644 --- a/module.xml +++ b/module.xml @@ -3,7 +3,7 @@ git-source-control - 2.7.0 + 2.7.1 Server-side source control extension for use of Git on InterSystems platforms git source control studio vscode module