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

Issue 30288 small fixes #30289

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion docker/k8s-aws-eks-manifest-examples/alb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
alb.ingress.kubernetes.io/backend-protocol: HTTP
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
alb.ingress.kubernetes.io/healthcheck-port: '8082'
alb.ingress.kubernetes.io/healthcheck-path: /api/v1/appconfiguration
alb.ingress.kubernetes.io/healthcheck-path: /api/v1/alive
alb.ingress.kubernetes.io/healthcheck-interval-seconds: '30'
alb.ingress.kubernetes.io/healthcheck-timeout-seconds: '5'
alb.ingress.kubernetes.io/success-codes: '200'
Expand Down
8 changes: 4 additions & 4 deletions docker/k8s-aws-eks-manifest-examples/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ spec:
fi; ln -s /data/shared/assets/.backup /data/local/dotsecure/backup;
startupProbe:
httpGet:
path: /api/v1/appconfiguration
path: /api/v1/heavy
port: 8082
initialDelaySeconds: 30
periodSeconds: 5
Expand All @@ -111,16 +111,16 @@ spec:
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /api/v1/appconfiguration
path: /api/v1/light
port: 8082
initialDelaySeconds: 1
periodSeconds: 30
successThreshold: 1
failureThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /api/v1/appconfiguration
path: /api/v1/light
port: 8082
initialDelaySeconds: 1
periodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
@SuppressWarnings("serial")
public class JVMInfoResource implements Serializable {

public static final Pattern obfuscateBasePattern = Pattern.compile("passw|pass|passwd|secret|key|token",
Pattern.CASE_INSENSITIVE);

public static final Pattern obfuscatePattern = Pattern.compile(
Config.getStringProperty("OBFUSCATE_SYSTEM_ENVIRONMENTAL_VARIABLES", "passw|pass|passwd|secret|key|token"),
Config.getStringProperty("OBFUSCATE_SYSTEM_ENVIRONMENTAL_VARIABLES", ""),
Pattern.CASE_INSENSITIVE);

@Path("/")
Expand Down Expand Up @@ -187,7 +190,9 @@ private Map<String,Object> getReleaseInfo(){
public static String obfuscateIfNeeded(final String key, final Object valueObject) {
final String value = (String) valueObject;
if(UtilMethods.isEmpty(value)) return "";
return obfuscatePattern.matcher(key).find() ? obfuscate(value) : value;
return obfuscateBasePattern.matcher(key).find() || obfuscatePattern.matcher(key).find()
? obfuscate(value)
: value;
}

private static String obfuscate(final String value) {
Expand Down
7 changes: 7 additions & 0 deletions dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)

try {
doFilterInternal(req, res, chain);
} catch (Exception e) {
if (e.getClass().getCanonicalName().contains("ClientAbortException")) {
Logger.info(this.getClass(), "ClientAbortException: " + ((HttpServletRequest) req).getRequestURI());
Logger.debug(this.getClass(), "ClientAbortException: " + e.getMessage());
} else {
throw e;
}
} finally {
DbConnectionFactory.closeSilently();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected Language getLanguage(final String languageId) {
}

// if we have a number
if(!languageId.contains("_")){
if(!languageId.contains("_") && !languageId.contains("-")) {
try {
final long parsedLangId = Long.parseLong(languageId);
return getLanguage(parsedLangId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,15 +735,11 @@ public List<HTMLPageVersion> getPages(final String templateId)

final DotConnect dotConnect = new DotConnect();

if (DbConnectionFactory.isMsSql()) {
dotConnect.setSQL("SELECT identifier,inode,language_id, variant_id as variant "
+ "FROM contentlet "
+ "WHERE JSON_VALUE(contentlet_as_json, '$.fields.template.value') = ?");
} else {
dotConnect.setSQL("SELECT identifier,inode,language_id,variant_id as variant "
+ "FROM contentlet "
+ "WHERE contentlet_as_json->'fields'->'template'->>'value' = ?");
}

dotConnect.setSQL("SELECT identifier,inode,language_id,variant_id as variant "
+ "FROM contentlet "
+ "WHERE contentlet_as_json->'fields'->'template'->>'value' = ?");


dotConnect.addParam(templateId);

Expand Down Expand Up @@ -980,4 +976,4 @@ private Collection<? extends Permissionable> findFolderAssetTemplate(final User
return Collections.emptyList();
}
}
}
}
27 changes: 0 additions & 27 deletions dotCMS/src/main/webapp/html/portlet/ext/director/init.jsp

This file was deleted.

2 changes: 0 additions & 2 deletions dotCMS/src/main/webapp/html/portlet/ext/director/sub_nav.jsp

This file was deleted.

108 changes: 0 additions & 108 deletions dotCMS/src/main/webapp/html/portlet/ext/director/unlock_container.jsp

This file was deleted.

138 changes: 0 additions & 138 deletions dotCMS/src/main/webapp/html/portlet/ext/director/unlock_contentlet.jsp

This file was deleted.

Loading
Loading