Skip to content

[bug] Call to Dynamic Update Server needs to URL encode + in version number #10908

Open

Description

@moranbw

Describe the bug

If you have a Dynamic Update Server defined like this:

"endpoints": [ "https://api.mydomain.com/update?current_version={{current_version}}&target={{target}}&arch={{arch}}" ],

And a semver version with build number like this: 1.8.0+1, the request will get sent like this:

GET /update?current_version=1.8.0+1&target=windows&arch=x86_64

This will cause the + to be converted into a blank space in most servers. Therefore you get an invalid semver of 1.8.0 1. I believe it should be sent like this:

GET /update?current_version=1.8.0%2B1&target=windows&arch=x86_64

Reproduction

No response

Expected behavior

The ability to verify with an update server using semver build numbers.

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 128.0.2739.63
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06)
    ✔ cargo: 1.80.1 (376290515 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.11.0
    - npm: 10.8.1

[-] Packages
    - tauri [RUST]: 1.7.2
    - tauri-build [RUST]: 1.5.4
    - wry [RUST]: 0.24.11
    - tao [RUST]: 0.16.5
    - @tauri-apps/api [NPM]: 1.6.0
    - @tauri-apps/cli [NPM]: 1.6.1

[-] App


### Stack trace

_No response_

### Additional context

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions