Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance #238

Merged
merged 5 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See https://s3ninja.net for more details.

## Contributions

Contributions as issues or pull requests are always welcome. Please [sign-off](https://developercertificate.org)
Contributions as issues or pull requests are always welcome. Please [sign off](https://developercertificate.org)
all your commits by adding a line like "Signed-off-by: Name <email>" at the end of each commit, indicating that
you wrote the code and have the right to pass it on as an open source

Expand Down
1 change: 0 additions & 1 deletion src/main/java/ninja/APILog.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.google.common.collect.Lists;
import sirius.kernel.commons.Watch;
import sirius.kernel.di.std.Register;
import sirius.kernel.nls.NLS;

import java.time.LocalDateTime;
import java.util.Iterator;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ninja/Aws4HashCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public String computeHash(WebContext webContext, String pathPrefix) throws Excep
Matcher matcher = AWS_AUTH4_PATTERN.matcher(webContext.getHeaderValue("Authorization").asString(""));

if (!matcher.matches()) {
// If the header doesn't match, let's try an URL parameter as we might be processing a presigned URL
// If the header doesn't match, let's try a URL parameter as we might be processing a presigned URL
matcher = X_AMZ_CREDENTIAL_PATTERN.matcher(webContext.get("X-Amz-Credential").asString(""));
if (!matcher.matches()) {
throw new IllegalArgumentException("Unknown AWS4 auth pattern");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ninja/AwsLegacyHashCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public String computeHash(WebContext webContext, String pathPrefix) throws Excep
SecretKeySpec keySpec = new SecretKeySpec(storage.getAwsSecretKey().getBytes(), "HmacSHA1");
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(keySpec);
byte[] result = mac.doFinal(stringToSign.toString().getBytes(StandardCharsets.UTF_8.name()));
byte[] result = mac.doFinal(stringToSign.toString().getBytes(StandardCharsets.UTF_8));
return Base64.getEncoder().encodeToString(result);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ninja/ListFileTreeVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected ListFileTreeVisitor(XMLStructuredOutput output,
}

@Override
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) {
File file = path.toFile();
String name = StoredObject.decodeKey(file.getName());

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/ninja/S3Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import java.time.format.DateTimeFormatterBuilder;
import java.util.Base64;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -1037,7 +1036,7 @@ private void completeMultipartUpload(WebContext webContext,
uploadId,
parts.entrySet()
.stream()
.sorted(Comparator.comparing(Map.Entry::getKey))
.sorted(Map.Entry.comparingByKey())
.map(Map.Entry::getValue)
.toList());

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ninja/SignedChunkHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void handle(ByteBuf content, boolean last) throws IOException {
}

// copy everything into the auxiliary buffer first, and try to pull as many complete chunks as possible from it
// afterwards
// afterward
chunkBuffer.writeBytes(content);
if (tryToCompleteTransfer()) {
drainAndFlush();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/footer.html.pasta
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div>
<small>
@sirius.kernel.info.Product.getProduct().getName() is made with all the love in the world by
<a href="http://www.scireum.de" target="_blank">scireum</a> in Remshalden
<a href="https://www.scireum.de" target="_blank">scireum</a> in Remshalden
</small>
</div>
<div class="text-right">
Expand Down
2 changes: 1 addition & 1 deletion src/site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h1>S3 ninja</h1>
<hr style="margin-bottom: 0px"/>
<div class="pull-left">
<small class="muted">
S3 ninja is made with all the love in the world by <a href="http://www.scireum.de"
S3 ninja is made with all the love in the world by <a href="https://www.scireum.de"
target="_blank">scireum</a> in Remshalden
</small>
</div>
Expand Down