diff --git a/.github/workflows/ci+cd.yml b/.github/workflows/ci+cd.yml index a3e79c14..a26a9df7 100644 --- a/.github/workflows/ci+cd.yml +++ b/.github/workflows/ci+cd.yml @@ -11,7 +11,7 @@ on: jobs: event_file: name: "Event File" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Upload uses: actions/upload-artifact@v4 @@ -25,11 +25,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-22.04, windows-latest] framework: [net462, net8.0] exclude: # dotnet on Linux cannot build net461 without additional, unnecessary, work - - os: ubuntu-latest + - os: ubuntu-22.04 framework: net462 concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.framework }} @@ -55,7 +55,7 @@ jobs: - name: Install python2 for test execution run: sudo apt-get install python2 - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' - name: Test Chorus run: dotnet test src/Chorus.Tests/Chorus.Tests.csproj -f ${{ matrix.framework }} --no-build -c Release --filter TestCategory!=SkipOnBuildServer -- NUnit.TestOutputXml=TestResults @@ -146,7 +146,7 @@ jobs: publish-nuget: name: "Publish NuGet package" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: build-installers if: github.event_name == 'push' steps: diff --git a/.github/workflows/test-results.yml b/.github/workflows/test-results.yml index 24aac13f..f2f5056c 100644 --- a/.github/workflows/test-results.yml +++ b/.github/workflows/test-results.yml @@ -11,7 +11,7 @@ on: jobs: test-results: name: Test Results - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: github.event.workflow_run.conclusion != 'skipped' permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index 42823738..bc99598f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Prevent S&R to Internet without full URL +- [SIL.Chorus.LibChorus] Correctly handle & and other special characters in passwords ## [5.1.0] - 2023-03-07 diff --git a/src/LibChorus/Model/ServerSettingsModel.cs b/src/LibChorus/Model/ServerSettingsModel.cs index eefb527a..71e4ceef 100644 --- a/src/LibChorus/Model/ServerSettingsModel.cs +++ b/src/LibChorus/Model/ServerSettingsModel.cs @@ -4,6 +4,7 @@ using System.Net; using System.Security.Cryptography; using System.Text; +using System.Web; using Chorus.Properties; using Chorus.Utilities; using Chorus.VcsDrivers; @@ -335,7 +336,7 @@ private WebResponse LogIn() var privateQuery = IsPrivateServer ? "?private=true" : string.Empty; var request = WebRequest.Create($"https://admin{LanguageForgeServer}/api/user/{Username}/projects{privateQuery}"); request.Method = "POST"; - var passwordBytes = Encoding.UTF8.GetBytes($"password={Password}"); + var passwordBytes = Encoding.UTF8.GetBytes($"password={HttpUtility.UrlEncode(Password)}"); request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = passwordBytes.Length; var passwordStream = request.GetRequestStream();