Compare commits

...

4 Commits

Author SHA1 Message Date
Alex
d54ed26c71 Release v1.7.5 (#3484)
* Release v1.7.5

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

* Update CHANGELOG.md

Co-authored-by: Victor Bayas <victorsbayas@gmail.com>

---------

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Cesar N. <11819101+cesnietor@users.noreply.github.com>
Co-authored-by: Victor Bayas <victorsbayas@gmail.com>
2024-12-06 19:42:16 -05:00
Cesar Celis
5cf02ffae9 Allow spaces in policy names (#3482) 2024-12-05 09:55:57 -08:00
Harshavardhana
6afd0b16dc avoid leaks during zip download and multi-object downloads (#3481) 2024-12-02 18:17:32 -08:00
dependabot[bot]
0b8af385f1 Bump cross-spawn from 7.0.3 to 7.0.6 in /web-app (#3474)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-29 14:09:44 -06:00
20 changed files with 75 additions and 83 deletions

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -112,7 +112,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
steps:
# To build minio image, we need to clone the repository first
- name: Clone github.com/minio/minio
@@ -150,7 +150,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -189,7 +189,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -243,7 +243,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -296,7 +296,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -348,7 +348,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -400,7 +400,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -448,7 +448,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -496,7 +496,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -544,7 +544,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -595,7 +595,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -648,7 +648,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -683,7 +683,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -720,7 +720,7 @@ jobs:
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
steps:
- name: Check out code
@@ -817,7 +817,7 @@ jobs:
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
steps:
- name: Check out code
@@ -867,7 +867,7 @@ jobs:
echo "replace github.com/minio/console => ../" >> go.mod
echo "updates to go.mod needed; to update it: go mod tidy"
go mod tidy -compat=1.22
go mod tidy -compat=1.23
echo "Get git version to build MinIO Image";
VERSION=`git rev-parse HEAD`;
@@ -901,7 +901,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -956,7 +956,7 @@ jobs:
echo "download golang x tools"
go mod download golang.org/x/tools
echo "go mod tidy compat mode"
go mod tidy -compat=1.22
go mod tidy -compat=1.23
echo "go build gocoverage.go"
go build gocovmerge.go
echo "put together the outs for final coverage resolution"
@@ -1027,7 +1027,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -1069,7 +1069,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -1109,7 +1109,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -1137,7 +1137,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -1164,7 +1164,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -1192,7 +1192,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -1220,7 +1220,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code

View File

@@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23.3
check-latest: true
- name: Get official govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.22 ]
go-version: [ 1.23.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code

View File

@@ -1,5 +1,12 @@
# Changelog
## Release v1.7.5
Bug Fix:
- Fixed leaks during ZIP multiobject downloads
- Allow spaces in Policy names
## Release v1.7.4
Deprecations:

View File

@@ -25,21 +25,7 @@ A graphical user interface for [MinIO](https://github.com/minio/minio)
<!-- markdown-toc end -->
## Install
MinIO Console is a library that provides a management and browser UI overlay for the MinIO Server.
The standalone binary installation path has been removed.
In case a Console standalone binary is needed, it can be generated by building this package from source as follows:
### Build from source
> You will need a working Go environment. Therefore, please follow [How to install Go](https://golang.org/doc/install).
> Minimum version required is go1.22
```
go install github.com/minio/console/cmd/console@latest
```
## Setup

View File

@@ -550,9 +550,6 @@ func getAddPolicyResponse(session *models.Principal, params policyApi.AddPolicyP
if params.Body == nil {
return nil, ErrorWithContext(ctx, ErrPolicyBodyNotInRequest)
}
if strings.Contains(*params.Body.Name, " ") {
return nil, ErrorWithContext(ctx, ErrPolicyNameContainsSpace)
}
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)

View File

@@ -43,7 +43,6 @@ var (
ErrGroupNameNotInRequest = errors.New("error group name not in request")
ErrPolicyNameNotInRequest = errors.New("error policy name not in request")
ErrPolicyBodyNotInRequest = errors.New("error policy body not in request")
ErrPolicyNameContainsSpace = errors.New("error policy name cannot contain spaces")
ErrInvalidEncryptionAlgorithm = errors.New("error invalid encryption algorithm")
ErrSSENotConfigured = errors.New("error server side encryption configuration not found")
ErrBucketLifeCycleNotConfigured = errors.New("error bucket life cycle configuration not found")
@@ -161,10 +160,6 @@ func ErrorWithContext(ctx context.Context, err ...interface{}) *CodedAPIError {
errorCode = 400
errorMessage = ErrPolicyBodyNotInRequest.Error()
}
if errors.Is(err1, ErrPolicyNameContainsSpace) {
errorCode = 400
errorMessage = ErrPolicyNameContainsSpace.Error()
}
// console invalid session errors
if errors.Is(err1, ErrInvalidSession) {
errorCode = 401

View File

@@ -550,10 +550,13 @@ func getDownloadFolderResponse(session *models.Principal, params objectApi.Downl
Modified: modified,
})
if err != nil {
object.Close()
// Ignore errors, move to next
continue
}
_, err = io.Copy(f, object)
object.Close()
if err != nil {
// We have a partial object, report error.
pw.CloseWithError(err)
@@ -650,14 +653,17 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
// Ignore errors, move to next
continue
}
modified, _ := time.Parse(time.RFC3339, obj.LastModified)
modified, _ := time.Parse(time.RFC3339, obj.LastModified)
f, err := addToZip(name, modified)
if err != nil {
object.Close()
// Ignore errors, move to next
continue
}
_, err = io.Copy(f, object)
object.Close()
if err != nil {
// We have a partial object, report error.
pw.CloseWithError(err)
@@ -666,13 +672,14 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
}
} else {
// add selected individual object
objectData, err := mClient.StatObject(ctx, params.BucketName, dObj, minio.StatObjectOptions{})
object, err := mClient.GetObject(ctx, params.BucketName, dObj, minio.GetObjectOptions{})
if err != nil {
// Ignore errors, move to next
continue
}
object, err := mClient.GetObject(ctx, params.BucketName, dObj, minio.GetObjectOptions{})
// add selected individual object
objectData, err := object.Stat()
if err != nil {
// Ignore errors, move to next
continue
@@ -683,10 +690,13 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
objectName := prefixes[len(prefixes)-1]
f, err := addToZip(objectName, objectData.LastModified)
if err != nil {
object.Close()
// Ignore errors, move to next
continue
}
_, err = io.Copy(f, object)
object.Close()
if err != nil {
// We have a partial object, report error.
pw.CloseWithError(err)

6
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/minio/console
go 1.22
go 1.23
require (
github.com/blang/semver/v4 v4.0.0
@@ -24,6 +24,7 @@ require (
github.com/minio/madmin-go/v3 v3.0.68
github.com/minio/mc v0.0.0-20240815155011-479171e7be9c
github.com/minio/minio-go/v7 v7.0.81-0.20241125171916-a563333c01ef
github.com/minio/pkg/v3 v3.0.22
github.com/minio/selfupdate v0.6.0
github.com/minio/websocket v1.6.0
github.com/mitchellh/go-homedir v1.1.0
@@ -35,14 +36,13 @@ require (
golang.org/x/crypto v0.28.0
golang.org/x/net v0.30.0
golang.org/x/oauth2 v0.22.0
// Added to include security fix for
// https://github.com/golang/go/issues/56152
golang.org/x/text v0.19.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
require github.com/minio/pkg/v3 v3.0.22
require (
aead.dev/mem v0.2.0 // indirect
aead.dev/minisign v0.3.0 // indirect

View File

@@ -176,7 +176,7 @@ func Test_AddPolicyAPI(t *testing.T) {
]
}`),
},
expectedStatus: 400,
expectedStatus: 201, // Changed the expected status from 400 to 201, as spaces are now allowed in policy names.
expectedError: nil,
},
{

View File

@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.e60e4760.css",
"main.js": "./static/js/main.578d0f97.js",
"main.js": "./static/js/main.954ee255.js",
"static/js/5301.79001158.chunk.js": "./static/js/5301.79001158.chunk.js",
"static/js/9361.f4bfeb22.chunk.js": "./static/js/9361.f4bfeb22.chunk.js",
"static/js/5711.6f5b125a.chunk.js": "./static/js/5711.6f5b125a.chunk.js",
@@ -15,7 +15,7 @@
"static/js/8715.08b2d38b.chunk.js": "./static/js/8715.08b2d38b.chunk.js",
"static/js/7880.5e820de1.chunk.js": "./static/js/7880.5e820de1.chunk.js",
"static/js/2209.3b0ca7fa.chunk.js": "./static/js/2209.3b0ca7fa.chunk.js",
"static/js/7435.242efaf1.chunk.js": "./static/js/7435.242efaf1.chunk.js",
"static/js/7435.279d39d5.chunk.js": "./static/js/7435.279d39d5.chunk.js",
"static/js/2491.b81bd18c.chunk.js": "./static/js/2491.b81bd18c.chunk.js",
"static/js/9269.80d85085.chunk.js": "./static/js/9269.80d85085.chunk.js",
"static/js/6925.c3c29d15.chunk.js": "./static/js/6925.c3c29d15.chunk.js",
@@ -100,7 +100,7 @@
"static/media/placeholderimage.png": "./static/media/placeholderimage.077ea48bd1ef1f4a883f.png",
"index.html": "./index.html",
"main.e60e4760.css.map": "./static/css/main.e60e4760.css.map",
"main.578d0f97.js.map": "./static/js/main.578d0f97.js.map",
"main.954ee255.js.map": "./static/js/main.954ee255.js.map",
"5301.79001158.chunk.js.map": "./static/js/5301.79001158.chunk.js.map",
"9361.f4bfeb22.chunk.js.map": "./static/js/9361.f4bfeb22.chunk.js.map",
"5711.6f5b125a.chunk.js.map": "./static/js/5711.6f5b125a.chunk.js.map",
@@ -114,7 +114,7 @@
"8715.08b2d38b.chunk.js.map": "./static/js/8715.08b2d38b.chunk.js.map",
"7880.5e820de1.chunk.js.map": "./static/js/7880.5e820de1.chunk.js.map",
"2209.3b0ca7fa.chunk.js.map": "./static/js/2209.3b0ca7fa.chunk.js.map",
"7435.242efaf1.chunk.js.map": "./static/js/7435.242efaf1.chunk.js.map",
"7435.279d39d5.chunk.js.map": "./static/js/7435.279d39d5.chunk.js.map",
"2491.b81bd18c.chunk.js.map": "./static/js/2491.b81bd18c.chunk.js.map",
"9269.80d85085.chunk.js.map": "./static/js/9269.80d85085.chunk.js.map",
"6925.c3c29d15.chunk.js.map": "./static/js/6925.c3c29d15.chunk.js.map",
@@ -179,6 +179,6 @@
},
"entrypoints": [
"static/css/main.e60e4760.css",
"static/js/main.578d0f97.js"
"static/js/main.954ee255.js"
]
}

View File

@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.578d0f97.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.954ee255.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -20,7 +20,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -84,7 +84,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -129,7 +129,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
steps:
- name: Check out code

View File

@@ -52,7 +52,7 @@ const AddPolicyScreen = () => {
setAddLoading(true);
api.policies
.addPolicy({
name: policyName,
name: policyName.trim(),
policy: policyDefinition,
})
.then((res) => {
@@ -79,15 +79,12 @@ const AddPolicyScreen = () => {
};
const validatePolicyname = (policyName: string) => {
if (policyName.indexOf(" ") !== -1) {
return "Policy name cannot contain spaces";
if (policyName.trim() === "") {
return "Policy name cannot be empty";
} else return "";
};
const validSave =
policyName.trim() !== "" &&
policyName.indexOf(" ") === -1 &&
policyDefinition.trim() !== "";
const validSave = policyName.trim() !== "" && policyDefinition.trim() !== "";
useEffect(() => {
dispatch(setHelpName("add_policy"));