Skip to content

Commit

Permalink
FIX: Remove a possibly duplicated encodeURI() (Issue #4428) (#4947)
Browse files Browse the repository at this point in the history
* FIX: Remove possibly duplicated encodeURI() to prevent double encode non-ascii path (Issue #4428 Cannot connect file share,cannot recognize non-ascii path)

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Boris Sekachev <sekachev.bs@gmail.com>
  • Loading branch information
rhee-elten and bsekachev committed Sep 15, 2022
1 parent f018a76 commit 15565cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TDB

### Fixed
- TDB
- Removed a possibly duplicated encodeURI() calls in `server-proxy.ts` to prevent doubly encoding
non-ascii paths while adding files from "Connected file share" (issue #4428)

### Security
- TDB
Expand Down
3 changes: 1 addition & 2 deletions cvat-core/src/server-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,12 @@ class ServerProxy {

async function share(directoryArg) {
const { backendAPI } = config;
const directory = encodeURI(directoryArg);

let response = null;
try {
response = await Axios.get(`${backendAPI}/server/share`, {
proxy: config.proxy,
params: { directory },
params: { directory: directoryArg },
});
} catch (errorData) {
throw generateError(errorData);
Expand Down

0 comments on commit 15565cb

Please sign in to comment.