mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove warnings
This commit is contained in:
@@ -67,7 +67,7 @@ public class FacebookFaviconFetcher extends AbstractFaviconFetcher {
|
||||
log.debug("could not parse url", e);
|
||||
return null;
|
||||
}
|
||||
List<NameValuePair> params = URLEncodedUtils.parse(uri, StandardCharsets.UTF_8.name());
|
||||
List<NameValuePair> params = URLEncodedUtils.parse(uri, StandardCharsets.UTF_8);
|
||||
for (NameValuePair param : params) {
|
||||
if ("id".equals(param.getName())) {
|
||||
return param.getValue();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.commafeed.frontend.auth;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -11,8 +13,6 @@ import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.eclipse.jetty.util.B64Code;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.glassfish.jersey.server.internal.inject.AbstractContainerRequestValueFactory;
|
||||
|
||||
import com.commafeed.backend.model.User;
|
||||
@@ -79,7 +79,8 @@ public class SecurityCheckFactory extends AbstractContainerRequestValueFactory<U
|
||||
if (space > 0) {
|
||||
String method = header.substring(0, space);
|
||||
if (PREFIX.equalsIgnoreCase(method)) {
|
||||
String decoded = B64Code.decode(header.substring(space + 1), StringUtil.__ISO_8859_1);
|
||||
byte[] decodedBytes = Base64.getDecoder().decode(header.substring(space + 1));
|
||||
String decoded = new String(decodedBytes, StandardCharsets.ISO_8859_1);
|
||||
int i = decoded.indexOf(':');
|
||||
if (i > 0) {
|
||||
String username = decoded.substring(0, i);
|
||||
|
||||
Reference in New Issue
Block a user