format
This commit is contained in:
@@ -175,7 +175,10 @@ public class KeygenLicenseVerifier {
|
||||
log.info("Machine activated successfully");
|
||||
return true;
|
||||
} else {
|
||||
log.error("Error activating machine. Status code: " + response.statusCode());
|
||||
log.error(
|
||||
"Error activating machine. Status code: {}, error: {}",
|
||||
response.statusCode(),
|
||||
response.body());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -37,10 +37,8 @@ public class LicenseKeyChecker {
|
||||
log.info(applicationProperties.toString());
|
||||
log.info(applicationProperties.getEnterpriseEdition().toString());
|
||||
if (!applicationProperties.getEnterpriseEdition().isEnabled()) {
|
||||
System.out.println("gggggg");
|
||||
enterpriseEnbaledResult = false;
|
||||
} else {
|
||||
System.out.println("ssssssssssss");
|
||||
enterpriseEnbaledResult =
|
||||
licenseService.verifyLicense(
|
||||
applicationProperties.getEnterpriseEdition().getKey());
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
//package stirling.software.SPDF.config.fingerprint;
|
||||
// package stirling.software.SPDF.config.fingerprint;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
// import java.io.IOException;
|
||||
//
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import org.springframework.web.filter.OncePerRequestFilter;
|
||||
// import org.springframework.beans.factory.annotation.Autowired;
|
||||
// import org.springframework.stereotype.Component;
|
||||
// import org.springframework.web.filter.OncePerRequestFilter;
|
||||
//
|
||||
//import jakarta.servlet.FilterChain;
|
||||
//import jakarta.servlet.ServletException;
|
||||
//import jakarta.servlet.http.HttpServletRequest;
|
||||
//import jakarta.servlet.http.HttpServletResponse;
|
||||
//import jakarta.servlet.http.HttpSession;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import stirling.software.SPDF.utils.RequestUriUtils;
|
||||
// import jakarta.servlet.FilterChain;
|
||||
// import jakarta.servlet.ServletException;
|
||||
// import jakarta.servlet.http.HttpServletRequest;
|
||||
// import jakarta.servlet.http.HttpServletResponse;
|
||||
// import jakarta.servlet.http.HttpSession;
|
||||
// import lombok.extern.slf4j.Slf4j;
|
||||
// import stirling.software.SPDF.utils.RequestUriUtils;
|
||||
//
|
||||
////@Component
|
||||
//@Slf4j
|
||||
//public class FingerprintBasedSessionFilter extends OncePerRequestFilter {
|
||||
//// @Component
|
||||
// @Slf4j
|
||||
// public class FingerprintBasedSessionFilter extends OncePerRequestFilter {
|
||||
// private final FingerprintGenerator fingerprintGenerator;
|
||||
// private final FingerprintBasedSessionManager sessionManager;
|
||||
//
|
||||
@@ -65,4 +65,4 @@
|
||||
// log.debug("Proceeding with request: {}", request.getRequestURI());
|
||||
// filterChain.doFilter(request, response);
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//package stirling.software.SPDF.config.fingerprint;
|
||||
// package stirling.software.SPDF.config.fingerprint;
|
||||
//
|
||||
//import java.util.Iterator;
|
||||
//import java.util.Map;
|
||||
//import java.util.concurrent.ConcurrentHashMap;
|
||||
//import java.util.concurrent.TimeUnit;
|
||||
// import java.util.Iterator;
|
||||
// import java.util.Map;
|
||||
// import java.util.concurrent.ConcurrentHashMap;
|
||||
// import java.util.concurrent.TimeUnit;
|
||||
//
|
||||
//import org.springframework.scheduling.annotation.Scheduled;
|
||||
//import org.springframework.stereotype.Component;
|
||||
// import org.springframework.scheduling.annotation.Scheduled;
|
||||
// import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import jakarta.servlet.http.HttpSession;
|
||||
//import jakarta.servlet.http.HttpSessionAttributeListener;
|
||||
//import jakarta.servlet.http.HttpSessionEvent;
|
||||
//import jakarta.servlet.http.HttpSessionListener;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Data;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
// import jakarta.servlet.http.HttpSession;
|
||||
// import jakarta.servlet.http.HttpSessionAttributeListener;
|
||||
// import jakarta.servlet.http.HttpSessionEvent;
|
||||
// import jakarta.servlet.http.HttpSessionListener;
|
||||
// import lombok.AllArgsConstructor;
|
||||
// import lombok.Data;
|
||||
// import lombok.extern.slf4j.Slf4j;
|
||||
//
|
||||
//@Slf4j
|
||||
//@Component
|
||||
//public class FingerprintBasedSessionManager
|
||||
// @Slf4j
|
||||
// @Component
|
||||
// public class FingerprintBasedSessionManager
|
||||
// implements HttpSessionListener, HttpSessionAttributeListener {
|
||||
// private static final ConcurrentHashMap<String, FingerprintInfo> activeFingerprints =
|
||||
// new ConcurrentHashMap<>();
|
||||
@@ -131,4 +131,4 @@
|
||||
// private String sessionId;
|
||||
// private long lastAccessTime;
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
//package stirling.software.SPDF.config.fingerprint;
|
||||
// package stirling.software.SPDF.config.fingerprint;
|
||||
//
|
||||
//import java.security.MessageDigest;
|
||||
//import java.security.NoSuchAlgorithmException;
|
||||
// import java.security.MessageDigest;
|
||||
// import java.security.NoSuchAlgorithmException;
|
||||
//
|
||||
//import org.springframework.stereotype.Component;
|
||||
// import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import jakarta.servlet.http.HttpServletRequest;
|
||||
// import jakarta.servlet.http.HttpServletRequest;
|
||||
//
|
||||
//@Component
|
||||
//public class FingerprintGenerator {
|
||||
// @Component
|
||||
// public class FingerprintGenerator {
|
||||
//
|
||||
// public String generateFingerprint(HttpServletRequest request) {
|
||||
// if (request == null) {
|
||||
@@ -74,4 +74,4 @@
|
||||
// throw new RuntimeException("Failed to generate fingerprint hash", e);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SecurityConfiguration {
|
||||
http.authenticationManager(authenticationManager(http));
|
||||
|
||||
if (loginEnabledValue) {
|
||||
http.addFilterBefore(
|
||||
http.addFilterBefore(
|
||||
userAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
http.csrf(csrf -> csrf.disable());
|
||||
http.addFilterBefore(rateLimitingFilter(), UsernamePasswordAuthenticationFilter.class);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ConvertPDFToPDFA {
|
||||
command.add("-dPDFA=" + ("pdfa".equals(outputFormat) ? "2" : "1"));
|
||||
command.add("-dNOPAUSE");
|
||||
command.add("-dBATCH");
|
||||
command.add("-sColorConversionStrategy=UseDeviceIndependentColor");
|
||||
command.add("-sColorConversionStrategy=sRGB");
|
||||
command.add("-sDEVICE=pdfwrite");
|
||||
command.add("-dPDFACompatibilityPolicy=2");
|
||||
command.add("-o");
|
||||
|
||||
@@ -39,9 +39,9 @@ public class PostHogService {
|
||||
}
|
||||
|
||||
private void captureSystemInfo() {
|
||||
if(!Boolean.getBoolean(applicationProperties.getSystem().getEnableAnalytics())) {
|
||||
return;
|
||||
}
|
||||
if (!Boolean.getBoolean(applicationProperties.getSystem().getEnableAnalytics())) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
postHog.capture(uniqueId, "system_info_captured", captureServerMetrics());
|
||||
} catch (Exception e) {
|
||||
@@ -50,9 +50,9 @@ public class PostHogService {
|
||||
}
|
||||
|
||||
public void captureEvent(String eventName, Map<String, Object> properties) {
|
||||
if(!Boolean.getBoolean(applicationProperties.getSystem().getEnableAnalytics())) {
|
||||
return;
|
||||
}
|
||||
if (!Boolean.getBoolean(applicationProperties.getSystem().getEnableAnalytics())) {
|
||||
return;
|
||||
}
|
||||
postHog.capture(uniqueId, eventName, properties);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,12 @@ import org.springframework.core.io.InputStreamResource;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
import stirling.software.SPDF.model.api.misc.ReplaceAndInvert;
|
||||
|
||||
@Data
|
||||
// @EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public abstract class ReplaceAndInvertColorStrategy extends PDFFile {
|
||||
|
||||
protected ReplaceAndInvert replaceAndInvert;
|
||||
|
||||
Reference in New Issue
Block a user