diff --git a/ecstore/src/io.rs b/ecstore/src/io.rs index 764c8834..3ca27fe0 100644 --- a/ecstore/src/io.rs +++ b/ecstore/src/io.rs @@ -140,10 +140,14 @@ impl EtagReader { impl AsyncRead for EtagReader { fn poll_read(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll> { + let befor_size = buf.filled().len(); + match Pin::new(&mut self.inner).poll_read(cx, buf) { Poll::Ready(Ok(())) => { - let bytes = buf.filled(); - self.md5.update(bytes); + if buf.filled().len() > befor_size { + let bytes = &buf.filled()[befor_size..]; + self.md5.update(bytes); + } Poll::Ready(Ok(())) } diff --git a/rustfs/src/auth.rs b/rustfs/src/auth.rs index 42d4a464..3d042553 100644 --- a/rustfs/src/auth.rs +++ b/rustfs/src/auth.rs @@ -113,15 +113,15 @@ pub fn check_claims_from_token(header: &HeaderMap, cred: &auth::Credentials) -> } if token.is_empty() && cred.is_temp() && !cred.is_service_account() { - return Err(s3_error!(InvalidRequest, "invalid token")); + return Err(s3_error!(InvalidRequest, "invalid token1")); } if !token.is_empty() && !cred.is_temp() { - return Err(s3_error!(InvalidRequest, "invalid token")); + return Err(s3_error!(InvalidRequest, "invalid token2")); } if !cred.is_service_account() && cred.is_temp() && token != cred.session_token { - return Err(s3_error!(InvalidRequest, "invalid token")); + return Err(s3_error!(InvalidRequest, "invalid token3")); } if cred.is_temp() && cred.is_expired() { diff --git a/scripts/static.sh b/scripts/static.sh index 9fd7469d..814762ec 100755 --- a/scripts/static.sh +++ b/scripts/static.sh @@ -1 +1 @@ -curl -L "https://dl.rustfs.com/console/rustfs-console-latest.zip" -o tempfile.zip && unzip -o tempfile.zip -d ./rustfs/static && rm tempfile.zip \ No newline at end of file +curl -L "https://dl.rustfs.com/artifacts/console/rustfs-console-latest.zip" -o tempfile.zip && unzip -o tempfile.zip -d ./rustfs/static && rm tempfile.zip \ No newline at end of file