instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
protected Instantiator createInstantiator() throws ServiceException {
return loadInstantiators().orElseGet(() -> {
DefaultInstantiator defaultInstantiator = new DefaultInstantiator(
this);
defaultInstantiator.init(this);
return defaultInstantiator;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInstantiator
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
createInstantiator
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
void conference(Call call, Call otherCall) {
call.conferenceWith(otherCall);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: conference
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
conference
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public ConnectionParams params(ExecutorService consumerWorkServiceExecutor) {
ConnectionParams result = new ConnectionParams();
result.setCredentialsProvider(credentialsProvider);
result.setConsumerWorkServiceExecutor(consumerWorkServiceExecutor);
result.setVirtualHost(virtualHost);
result.setClientProperties(getClientProperties());
result.setRequestedFrameMax(requestedFrameMax);
result.setRequestedChannelMax(requestedChannelMax);
result.setShutdownTimeout(shutdownTimeout);
result.setSaslConfig(saslConfig);
result.setNetworkRecoveryInterval(networkRecoveryInterval);
result.setRecoveryDelayHandler(recoveryDelayHandler);
result.setTopologyRecovery(topologyRecovery);
result.setTopologyRecoveryExecutor(topologyRecoveryExecutor);
result.setExceptionHandler(exceptionHandler);
result.setThreadFactory(threadFactory);
result.setHandshakeTimeout(handshakeTimeout);
result.setRequestedHeartbeat(requestedHeartbeat);
result.setShutdownExecutor(shutdownExecutor);
result.setHeartbeatExecutor(heartbeatExecutor);
result.setChannelRpcTimeout(channelRpcTimeout);
result.setChannelShouldCheckRpcResponseType(channelShouldCheckRpcResponseType);
result.setWorkPoolTimeout(workPoolTimeout);
result.setErrorOnWriteListener(errorOnWriteListener);
result.setTopologyRecoveryFilter(topologyRecoveryFilter);
result.setConnectionRecoveryTriggeringCondition(connectionRecoveryTriggeringCondition);
result.setTopologyRecoveryRetryHandler(topologyRecoveryRetryHandler);
result.setRecoveredQueueNameSupplier(recoveredQueueNameSupplier);
result.setTrafficListener(trafficListener);
result.setCredentialsRefreshService(credentialsRefreshService);
return result;
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-46120
- Severity: HIGH
- CVSS Score: 7.5
Description: Add max inbound message size to ConnectionFactory
To avoid OOM with a very large message.
The default value is 64 MiB.
Fixes #1062
(cherry picked from commit 9ed45fde52224ec74fc523321efdf9a157d5cfca)
Function: params
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
Fixed Code:
public ConnectionParams params(ExecutorService consumerWorkServiceExecutor) {
ConnectionParams result = new ConnectionParams();
result.setCredentialsProvider(credentialsProvider);
result.setConsumerWorkServiceExecutor(consumerWorkServiceExecutor);
result.setVirtualHost(virtualHost);
result.setClientProperties(getClientProperties());
result.setRequestedFrameMax(requestedFrameMax);
result.setRequestedChannelMax(requestedChannelMax);
result.setShutdownTimeout(shutdownTimeout);
result.setSaslConfig(saslConfig);
result.setNetworkRecoveryInterval(networkRecoveryInterval);
result.setRecoveryDelayHandler(recoveryDelayHandler);
result.setTopologyRecovery(topologyRecovery);
result.setTopologyRecoveryExecutor(topologyRecoveryExecutor);
result.setExceptionHandler(exceptionHandler);
result.setThreadFactory(threadFactory);
result.setHandshakeTimeout(handshakeTimeout);
result.setRequestedHeartbeat(requestedHeartbeat);
result.setShutdownExecutor(shutdownExecutor);
result.setHeartbeatExecutor(heartbeatExecutor);
result.setChannelRpcTimeout(channelRpcTimeout);
result.setChannelShouldCheckRpcResponseType(channelShouldCheckRpcResponseType);
result.setWorkPoolTimeout(workPoolTimeout);
result.setErrorOnWriteListener(errorOnWriteListener);
result.setTopologyRecoveryFilter(topologyRecoveryFilter);
result.setConnectionRecoveryTriggeringCondition(connectionRecoveryTriggeringCondition);
result.setTopologyRecoveryRetryHandler(topologyRecoveryRetryHandler);
result.setRecoveredQueueNameSupplier(recoveredQueueNameSupplier);
result.setTrafficListener(trafficListener);
result.setCredentialsRefreshService(credentialsRefreshService);
result.setMaxInboundMessageBodySize(maxInboundMessageBodySize);
return result;
}
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
params
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 1
|
Analyze the following code function for security vulnerabilities
|
private static String processClass(ProcessRecord process) {
if (process == null || process.pid == MY_PID) {
return "system_server";
} else if ((process.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
return "system_app";
} else {
return "data_app";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processClass
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
processClass
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public void rendererUnresponsive() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rendererUnresponsive
File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
rendererUnresponsive
|
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Document build(final InputStream in)
throws JDOMException, IOException {
try {
return getEngine().build(in);
} finally {
if (!reuseParser) {
engine = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
build
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onSent(Context context) {
// is single part or last part of multipart message
boolean isSinglePartOrLastPart = true;
if (mUnsentPartCount != null) {
isSinglePartOrLastPart = mUnsentPartCount.decrementAndGet() == 0;
}
if (isSinglePartOrLastPart) {
int messageType = Sms.MESSAGE_TYPE_SENT;
if (mAnyPartFailed != null && mAnyPartFailed.get()) {
messageType = Sms.MESSAGE_TYPE_FAILED;
}
persistOrUpdateMessage(context, messageType, 0/*errorCode*/);
}
if (mSentIntent != null) {
try {
// Extra information to send with the sent intent
Intent fillIn = new Intent();
if (mMessageUri != null) {
// Pass this to SMS apps so that they know where it is stored
fillIn.putExtra("uri", mMessageUri.toString());
}
if (mUnsentPartCount != null && isSinglePartOrLastPart) {
// Is multipart and last part
fillIn.putExtra(SEND_NEXT_MSG_EXTRA, true);
}
mSentIntent.send(context, Activity.RESULT_OK, fillIn);
} catch (CanceledException ex) {
Rlog.e(TAG, "Failed to send result");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSent
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
onSent
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
private VerifyCredentialResponse verifyCredential(int userId, CredentialHash storedHash,
String credential, boolean hasChallenge, long challenge, CredentialUtil credentialUtil)
throws RemoteException {
if ((storedHash == null || storedHash.hash.length == 0) && TextUtils.isEmpty(credential)) {
// don't need to pass empty credentials to GateKeeper
return VerifyCredentialResponse.OK;
}
if (TextUtils.isEmpty(credential)) {
return VerifyCredentialResponse.ERROR;
}
if (storedHash.version == CredentialHash.VERSION_LEGACY) {
byte[] hash = credentialUtil.toHash(credential, userId);
if (Arrays.equals(hash, storedHash.hash)) {
unlockKeystore(credentialUtil.adjustForKeystore(credential), userId);
// migrate credential to GateKeeper
credentialUtil.setCredential(credential, null, userId);
if (!hasChallenge) {
return VerifyCredentialResponse.OK;
}
// Fall through to get the auth token. Technically this should never happen,
// as a user that had a legacy credential would have to unlock their device
// before getting to a flow with a challenge, but supporting for consistency.
} else {
return VerifyCredentialResponse.ERROR;
}
}
VerifyCredentialResponse response;
boolean shouldReEnroll = false;;
if (hasChallenge) {
byte[] token = null;
GateKeeperResponse gateKeeperResponse = getGateKeeperService()
.verifyChallenge(userId, challenge, storedHash.hash, credential.getBytes());
int responseCode = gateKeeperResponse.getResponseCode();
if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
response = new VerifyCredentialResponse(gateKeeperResponse.getTimeout());
} else if (responseCode == GateKeeperResponse.RESPONSE_OK) {
token = gateKeeperResponse.getPayload();
if (token == null) {
// something's wrong if there's no payload with a challenge
Slog.e(TAG, "verifyChallenge response had no associated payload");
response = VerifyCredentialResponse.ERROR;
} else {
shouldReEnroll = gateKeeperResponse.getShouldReEnroll();
response = new VerifyCredentialResponse(token);
}
} else {
response = VerifyCredentialResponse.ERROR;
}
} else {
GateKeeperResponse gateKeeperResponse = getGateKeeperService().verify(
userId, storedHash.hash, credential.getBytes());
int responseCode = gateKeeperResponse.getResponseCode();
if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
response = new VerifyCredentialResponse(gateKeeperResponse.getTimeout());
} else if (responseCode == GateKeeperResponse.RESPONSE_OK) {
shouldReEnroll = gateKeeperResponse.getShouldReEnroll();
response = VerifyCredentialResponse.OK;
} else {
response = VerifyCredentialResponse.ERROR;
}
}
if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
// credential has matched
unlockKeystore(credential, userId);
if (shouldReEnroll) {
credentialUtil.setCredential(credential, credential, userId);
}
} else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
if (response.getTimeout() > 0) {
requireStrongAuth(STRONG_AUTH_REQUIRED_AFTER_LOCKOUT, userId);
}
}
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyCredential
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2016-3749
|
MEDIUM
| 4.6
|
android
|
verifyCredential
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforcePolicyAccess(String pkg, String method) {
if (PackageManager.PERMISSION_GRANTED == getContext().checkCallingPermission(
android.Manifest.permission.MANAGE_NOTIFICATIONS)) {
return;
}
if (!checkPolicyAccess(pkg)) {
Slog.w(TAG, "Notification policy access denied calling " + method);
throw new SecurityException("Notification policy access denied");
}
}
|
Vulnerability Classification:
- CWE: CWE-284
- CVE: CVE-2016-3884
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Check uid for notification policy access.
Bug: 29421441
Change-Id: Ia0a7b06112dde1c925ec3232f50bf4d90b17b5e5
(cherry picked from commit 0cd1b789567b60b963fc7b8935e898ea0e61a617)
Function: enforcePolicyAccess
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
Fixed Code:
private void enforcePolicyAccess(String pkg, String method) {
if (PackageManager.PERMISSION_GRANTED == getContext().checkCallingPermission(
android.Manifest.permission.MANAGE_NOTIFICATIONS)) {
return;
}
checkCallerIsSameApp(pkg);
if (!checkPolicyAccess(pkg)) {
Slog.w(TAG, "Notification policy access denied calling " + method);
throw new SecurityException("Notification policy access denied");
}
}
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
enforcePolicyAccess
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 1
|
Analyze the following code function for security vulnerabilities
|
public static void setupDefaultSecurity(final XStream xstream) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setupDefaultSecurity
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
setupDefaultSecurity
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isCompatible(SymmetricEncryptionConfig c1, SymmetricEncryptionConfig c2) {
boolean c1Disabled = c1 == null || !c1.isEnabled();
boolean c2Disabled = c2 == null || !c2.isEnabled();
return c1 == c2 || (c1Disabled && c2Disabled) || (c1 != null && c2 != null
&& nullSafeEqual(c1.getSalt(), c2.getSalt())
&& nullSafeEqual(c1.getPassword(), c2.getPassword()))
&& nullSafeEqual(c1.getIterationCount(), c2.getIterationCount())
&& nullSafeEqual(c1.getAlgorithm(), c2.getAlgorithm())
&& nullSafeEqual(c1.getKey(), c2.getKey());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompatible
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
isCompatible
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Editor<T> getEditor() {
return editor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditor
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getEditor
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean browserHasForward(PeerComponent browserPeer) {
return ((AndroidImplementation.AndroidBrowserComponent) browserPeer).hasForward();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: browserHasForward
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
browserHasForward
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void addCall(Call call) {
if (mCallIdMapper.getCallId(call) == null) {
mCallIdMapper.addCall(call);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCall
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
addCall
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void loadAttachmentsContentSafe(XWikiContext context)
{
for (XWikiAttachment attachment : getAttachmentList()) {
try {
attachment.loadAttachmentContent(context);
} catch (XWikiException e) {
LOGGER.warn("Failed to load attachment [{}]: {}", attachment.getReference(),
ExceptionUtils.getRootCauseMessage(e));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadAttachmentsContentSafe
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
loadAttachmentsContentSafe
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getAutoTimeEnabled(@Nullable ComponentName who, String callerPackageName) {
if (!mHasFeature) {
return false;
}
CallerIdentity caller;
if (isUnicornFlagEnabled()) {
caller = getCallerIdentity(who, callerPackageName);
} else {
caller = getCallerIdentity(who);
}
if (isUnicornFlagEnabled()) {
enforceCanQuery(SET_TIME, caller.getPackageName(), UserHandle.USER_ALL);
} else {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkCallAuthorization(isProfileOwnerOnUser0(caller)
|| isProfileOwnerOfOrganizationOwnedDevice(caller) || isDefaultDeviceOwner(
caller));
}
return mInjector.settingsGlobalGetInt(Global.AUTO_TIME, 0) > 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAutoTimeEnabled
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getAutoTimeEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateCharacterStream(@Positive int columnIndex,
@Nullable Reader reader, long length)
throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(),
"updateCharaceterStream(int, Reader, long)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCharacterStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateCharacterStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isAlreadyFetched(From<?, ?> from, String attribute) {
for (Fetch<?, ?> f : from.getFetches()) {
boolean sameName = f.getAttribute().getName().equals(attribute);
if (sameName && f.getJoinType().equals(JoinType.LEFT)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAlreadyFetched
File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
isAlreadyFetched
|
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void viewForm(User submittedData) {
setProperty("headerTitle", getPropertyString("label"));
setProperty("view", "formView");
ApplicationContext ac = AppUtil.getApplicationContext();
WorkflowUserManager workflowUserManager = (WorkflowUserManager) ac.getBean("workflowUserManager");
UserDao userDao = (UserDao) ac.getBean("userDao");
User user = submittedData;
if (user == null) {
user = userDao.getUser(workflowUserManager.getCurrentUsername());
}
if (user != null && user.getReadonly()) {
return;
}
setProperty("user", user);
setProperty("timezones", TimeZoneUtil.getList());
SetupManager setupManager = (SetupManager) ac.getBean("setupManager");
String enableUserLocale = setupManager.getSettingValue("enableUserLocale");
Map<String, String> localeStringList = new TreeMap<String, String>();
if(enableUserLocale != null && enableUserLocale.equalsIgnoreCase("true")) {
String userLocale = setupManager.getSettingValue("userLocale");
Collection<String> locales = new HashSet();
locales.addAll(Arrays.asList(userLocale.split(",")));
Locale[] localeList = Locale.getAvailableLocales();
for (int x = 0; x < localeList.length; x++) {
String code = localeList[x].toString();
if (locales.contains(code)) {
localeStringList.put(code, code + " - " +localeList[x].getDisplayName());
}
}
}
setProperty("enableUserLocale", enableUserLocale);
setProperty("localeStringList", localeStringList);
UserSecurity us = DirectoryUtil.getUserSecurity();
if (us != null) {
setProperty("policies", us.passwordPolicies());
setProperty("userProfileFooter", us.getUserProfileFooter(user));
}
String url = getUrl() + "?action=submit";
setProperty("actionUrl", url);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: viewForm
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4859
|
MEDIUM
| 4
|
jogetworkflow/jw-community
|
viewForm
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
|
9a77f508a2bf8cf661d588f37a4cc29ecaea4fc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte[] getIntentFilterVerificationBackup(int userId) {
if (Binder.getCallingUid() != Process.SYSTEM_UID) {
throw new SecurityException("Only the system may call getIntentFilterVerificationBackup()");
}
ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
try {
final XmlSerializer serializer = new FastXmlSerializer();
serializer.setOutput(dataStream, StandardCharsets.UTF_8.name());
serializer.startDocument(null, true);
serializer.startTag(null, TAG_INTENT_FILTER_VERIFICATION);
synchronized (mPackages) {
mSettings.writeAllDomainVerificationsLPr(serializer, userId);
}
serializer.endTag(null, TAG_INTENT_FILTER_VERIFICATION);
serializer.endDocument();
serializer.flush();
} catch (Exception e) {
if (DEBUG_BACKUP) {
Slog.e(TAG, "Unable to write default apps for backup", e);
}
return null;
}
return dataStream.toByteArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntentFilterVerificationBackup
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getIntentFilterVerificationBackup
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setScmCheckoutRetryCount(int scmCheckoutRetryCount) throws IOException {
this.scmCheckoutRetryCount = scmCheckoutRetryCount;
save();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScmCheckoutRetryCount
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
setScmCheckoutRetryCount
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Object getProviderRoleBUuid(String providerRoleUuid) {
// we have to fetch the provider roles by reflection, since the provider management module is not a required dependency
try {
Class<?> providerManagementServiceClass = Context.loadClass("org.openmrs.module.providermanagement.api.ProviderManagementService");
Object providerManagementService = Context.getService(providerManagementServiceClass);
Method getProviderRoleByUuid = providerManagementServiceClass.getMethod("getProviderRoleByUuid", String.class);
return getProviderRoleByUuid.invoke(providerManagementService, providerRoleUuid);
}
catch(Exception e) {
throw new RuntimeException("Unable to get provider role by uuid; the Provider Management module needs to be installed if using the providerRoles attribute", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProviderRoleBUuid
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getProviderRoleBUuid
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private final String checkContentProviderPermissionLocked(
ProviderInfo cpi, ProcessRecord r, int userId, boolean checkUser) {
final int callingPid = (r != null) ? r.pid : Binder.getCallingPid();
final int callingUid = (r != null) ? r.uid : Binder.getCallingUid();
boolean checkedGrants = false;
if (checkUser) {
// Looking for cross-user grants before enforcing the typical cross-users permissions
int tmpTargetUserId = unsafeConvertIncomingUser(userId);
if (tmpTargetUserId != UserHandle.getUserId(callingUid)) {
if (checkAuthorityGrants(callingUid, cpi, tmpTargetUserId, checkUser)) {
return null;
}
checkedGrants = true;
}
userId = handleIncomingUser(callingPid, callingUid, userId,
false, ALLOW_NON_FULL,
"checkContentProviderPermissionLocked " + cpi.authority, null);
if (userId != tmpTargetUserId) {
// When we actually went to determine the final targer user ID, this ended
// up different than our initial check for the authority. This is because
// they had asked for USER_CURRENT_OR_SELF and we ended up switching to
// SELF. So we need to re-check the grants again.
checkedGrants = false;
}
}
if (checkComponentPermission(cpi.readPermission, callingPid, callingUid,
cpi.applicationInfo.uid, cpi.exported)
== PackageManager.PERMISSION_GRANTED) {
return null;
}
if (checkComponentPermission(cpi.writePermission, callingPid, callingUid,
cpi.applicationInfo.uid, cpi.exported)
== PackageManager.PERMISSION_GRANTED) {
return null;
}
PathPermission[] pps = cpi.pathPermissions;
if (pps != null) {
int i = pps.length;
while (i > 0) {
i--;
PathPermission pp = pps[i];
String pprperm = pp.getReadPermission();
if (pprperm != null && checkComponentPermission(pprperm, callingPid, callingUid,
cpi.applicationInfo.uid, cpi.exported)
== PackageManager.PERMISSION_GRANTED) {
return null;
}
String ppwperm = pp.getWritePermission();
if (ppwperm != null && checkComponentPermission(ppwperm, callingPid, callingUid,
cpi.applicationInfo.uid, cpi.exported)
== PackageManager.PERMISSION_GRANTED) {
return null;
}
}
}
if (!checkedGrants && checkAuthorityGrants(callingUid, cpi, userId, checkUser)) {
return null;
}
String msg;
if (!cpi.exported) {
msg = "Permission Denial: opening provider " + cpi.name
+ " from " + (r != null ? r : "(null)") + " (pid=" + callingPid
+ ", uid=" + callingUid + ") that is not exported from uid "
+ cpi.applicationInfo.uid;
} else {
msg = "Permission Denial: opening provider " + cpi.name
+ " from " + (r != null ? r : "(null)") + " (pid=" + callingPid
+ ", uid=" + callingUid + ") requires "
+ cpi.readPermission + " or " + cpi.writePermission;
}
Slog.w(TAG, msg);
return msg;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkContentProviderPermissionLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
checkContentProviderPermissionLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SynchronizerTokenService getInstance() {
return ServiceProvider.getService(SynchronizerTokenService.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getInstance
|
core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public SerializationConfig setPortableFactoryClasses(Map<Integer, String> portableFactoryClasses) {
this.portableFactoryClasses = portableFactoryClasses;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPortableFactoryClasses
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setPortableFactoryClasses
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
int result;
result = url.hashCode();
result = 31 * result + (int) (revision ^ (revision >>> 32));
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
hashCode
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void systemBooted() {
if (mKeyguardDelegate != null) {
mKeyguardDelegate.bindService(mContext);
mKeyguardDelegate.onBootCompleted();
}
synchronized (mLock) {
mSystemBooted = true;
}
wakingUp();
screenTurningOn(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: systemBooted
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
systemBooted
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setupPasswordRequirementsView(View view) {
mPasswordRestrictionView = view.findViewById(R.id.password_requirements_view);
mPasswordRestrictionView.setLayoutManager(new LinearLayoutManager(getActivity()));
mPasswordRequirementAdapter = new PasswordRequirementAdapter();
mPasswordRestrictionView.setAdapter(mPasswordRequirementAdapter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setupPasswordRequirementsView
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
setupPasswordRequirementsView
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBasePath() {
return basePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBasePath
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getBasePath
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Long getTimeMillis(K name) {
V v = get(name);
try {
return v != null ? toTimeMillis(name, v) : null;
} catch (RuntimeException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimeMillis
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
getTimeMillis
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public double getSize() {
return m_size;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSize
File: src/org/opencms/file/types/CmsResourceTypeImage.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
getSize
|
src/org/opencms/file/types/CmsResourceTypeImage.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Collection<RpcDecoder> loadDecoders() {
List<RpcDecoder> decoders = new ArrayList<>();
decoders.add(new StringToNumberDecoder());
decoders.add(new StringToEnumDecoder());
decoders.add(new DefaultRpcDecoder());
return decoders;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadDecoders
File: flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/PublishedServerEventHandlerRpcHandler.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25500
|
MEDIUM
| 4.3
|
vaadin/flow
|
loadDecoders
|
flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/PublishedServerEventHandlerRpcHandler.java
|
1fa4976902a117455bf2f98b191f8c80692b53c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setFieldsFromRefMessage(int action) {
setSubject(mRefMessage, action);
// Setup recipients
if (action == FORWARD) {
mForward = true;
}
initRecipientsFromRefMessage(mRefMessage, action);
initQuotedTextFromRefMessage(mRefMessage, action);
if (action == ComposeActivity.FORWARD || mAttachmentsChanged) {
initAttachments(mRefMessage);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFieldsFromRefMessage
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
setFieldsFromRefMessage
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetKeyguard() {
resetStateLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetKeyguard
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
resetKeyguard
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void moveTaskToStack(int taskId, int stackId, boolean toTop) {
synchronized (mWindowMap) {
if (DEBUG_STACK) Slog.i(TAG, "moveTaskToStack: moving taskId=" + taskId
+ " to stackId=" + stackId + " at " + (toTop ? "top" : "bottom"));
Task task = mTaskIdToTask.get(taskId);
if (task == null) {
if (DEBUG_STACK) Slog.i(TAG, "moveTaskToStack: could not find taskId=" + taskId);
return;
}
TaskStack stack = mStackIdToStack.get(stackId);
if (stack == null) {
if (DEBUG_STACK) Slog.i(TAG, "moveTaskToStack: could not find stackId=" + stackId);
return;
}
task.moveTaskToStack(stack, toTop);
final DisplayContent displayContent = stack.getDisplayContent();
displayContent.layoutNeeded = true;
performLayoutAndPlaceSurfacesLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToStack
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
moveTaskToStack
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void checkPackageAccess(String pkg) {
try {
if (enterPublicInterface())
return;
super.checkPackageAccess(pkg);
if (!isMainThreadAndInactive() && isPackageAccessForbidden(pkg)) {
/*
* this is a very expensive operation, can we do better? (no)
*/
checkForNonWhitelistedStackFrames(() -> {
LOG.warn("BAD PACKAGE ACCESS: {} (BL:{}, WL:{})", pkg, isPackageBlacklisted(pkg), //$NON-NLS-1$
isPackageWhitelisted(pkg));
return formatLocalized("security.error_disallowed_package", pkg); //$NON-NLS-1$
}, IGNORE_ACCESS_PRIVILEGED);
}
} finally {
exitPublicInterface();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPackageAccess
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
checkPackageAccess
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("singlepage/{nodeId}")
@Operation(summary = "Update a Single Page Element on course", description = "This updates a Single Page Element onto a given course")
@ApiResponse(responseCode = "200", description = "The course node metadatas", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) })
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient")
@ApiResponse(responseCode = "404", description = "The course or parentNode not found")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response updateSinglePage(@PathParam("courseId") Long courseId, @PathParam("nodeId") String nodeId,
@Context HttpServletRequest request) {
InputStream in = null;
MultipartReader reader = null;
try {
reader = new MultipartReader(request);
String shortTitle = reader.getValue("shortTitle");
String longTitle = reader.getValue("longTitle");
String objectives = reader.getValue("objectives");
String visibilityExpertRules = reader.getValue("visibilityExpertRules");
String filename = reader.getValue("filename", "attachment");
String accessExpertRules = reader.getValue("accessExpertRules");
in = new FileInputStream(reader.getFile());
SinglePageCustomConfig config = new SinglePageCustomConfig(in, filename);
return update(courseId, nodeId, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request);
} catch (Exception e) {
log.error("", e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
} finally {
MultipartReader.closeQuietly(reader);
IOUtils.closeQuietly(in);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSinglePage
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
updateSinglePage
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
public NotificationListenerFilter getListenerFilter(ComponentName cn, int userId) {
NotificationListenerFilter nlf = null;
try {
nlf = sINM.getListenerFilter(cn, userId);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
return nlf != null ? nlf : new NotificationListenerFilter();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getListenerFilter
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
getListenerFilter
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
@PUT
@Path("{userId}")
@ApiOperation("Modify user details.")
@ApiResponses({
@ApiResponse(code = 400, message = "Attempted to modify a read only user account (e.g. built-in or LDAP users)."),
@ApiResponse(code = 400, message = "Missing or invalid user details.")
})
@AuditEvent(type = AuditEventTypes.USER_UPDATE)
public void changeUser(@ApiParam(name = "userId", value = "The ID of the user to modify.", required = true)
@PathParam("userId") String userId,
@ApiParam(name = "JSON body", value = "Updated user information.", required = true)
@Valid @NotNull ChangeUserRequest cr) throws ValidationException {
final User user = loadUserById(userId);
final String username = user.getName();
checkPermission(USERS_EDIT, username);
if (user.isReadOnly()) {
throw new BadRequestException("Cannot modify readonly user " + username);
}
// We only allow setting a subset of the fields in ChangeUserRequest
if (!user.isExternalUser()) {
if (cr.email() != null) {
user.setEmail(cr.email());
}
if (cr.firstName() != null && cr.lastName() != null) {
user.setFirstLastFullNames(cr.firstName(), cr.lastName());
}
}
final boolean permitted = isPermitted(USERS_PERMISSIONSEDIT, user.getName());
if (permitted && cr.permissions() != null) {
user.setPermissions(getEffectiveUserPermissions(user, cr.permissions()));
}
if (isPermitted(USERS_ROLESEDIT, user.getName())) {
checkAdminRoleForServiceAccount(cr, user);
setUserRoles(cr.roles(), user);
}
final String timezone = cr.timezone();
if (timezone == null) {
user.setTimeZone((String) null);
} else {
try {
if (timezone.isEmpty()) {
user.setTimeZone((String) null);
} else {
final DateTimeZone tz = DateTimeZone.forID(timezone);
user.setTimeZone(tz);
}
} catch (IllegalArgumentException e) {
LOG.error("Invalid timezone '{}', ignoring it for user {}.", timezone, username);
}
}
final Startpage startpage = cr.startpage();
if (startpage != null) {
user.setStartpage(startpage.type(), startpage.id());
}
if (isPermitted("*")) {
final Long sessionTimeoutMs = cr.sessionTimeoutMs();
if (Objects.nonNull(sessionTimeoutMs) && sessionTimeoutMs != 0 && (user.getSessionTimeoutMs() != sessionTimeoutMs)) {
updateExistingSession(user, sessionTimeoutMs);
user.setSessionTimeoutMs(sessionTimeoutMs);
}
}
if (cr.isServiceAccount() != null) {
user.setServiceAccount(cr.isServiceAccount());
}
userManagementService.update(user, cr);
}
|
Vulnerability Classification:
- CWE: CWE-613
- CVE: CVE-2023-41041
- Severity: LOW
- CVSS Score: 3.1
Description: Merge pull request from GHSA-3fqm-frhg-7c85
- Clear session from cache on all nodes after deletion
- Add changelog
Co-authored-by: Othello Maurer <othello@graylog.com>
Function: changeUser
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
Fixed Code:
@PUT
@Path("{userId}")
@ApiOperation("Modify user details.")
@ApiResponses({
@ApiResponse(code = 400, message = "Attempted to modify a read only user account (e.g. built-in or LDAP users)."),
@ApiResponse(code = 400, message = "Missing or invalid user details.")
})
@AuditEvent(type = AuditEventTypes.USER_UPDATE)
public void changeUser(@ApiParam(name = "userId", value = "The ID of the user to modify.", required = true)
@PathParam("userId") String userId,
@ApiParam(name = "JSON body", value = "Updated user information.", required = true)
@Valid @NotNull ChangeUserRequest cr) throws ValidationException {
final User user = loadUserById(userId);
final String username = user.getName();
checkPermission(USERS_EDIT, username);
if (user.isReadOnly()) {
throw new BadRequestException("Cannot modify readonly user " + username);
}
// We only allow setting a subset of the fields in ChangeUserRequest
if (!user.isExternalUser()) {
if (cr.email() != null) {
user.setEmail(cr.email());
}
if (cr.firstName() != null && cr.lastName() != null) {
user.setFirstLastFullNames(cr.firstName(), cr.lastName());
}
}
final boolean permitted = isPermitted(USERS_PERMISSIONSEDIT, user.getName());
if (permitted && cr.permissions() != null) {
user.setPermissions(getEffectiveUserPermissions(user, cr.permissions()));
}
if (isPermitted(USERS_ROLESEDIT, user.getName())) {
checkAdminRoleForServiceAccount(cr, user);
setUserRoles(cr.roles(), user);
}
final String timezone = cr.timezone();
if (timezone == null) {
user.setTimeZone((String) null);
} else {
try {
if (timezone.isEmpty()) {
user.setTimeZone((String) null);
} else {
final DateTimeZone tz = DateTimeZone.forID(timezone);
user.setTimeZone(tz);
}
} catch (IllegalArgumentException e) {
LOG.error("Invalid timezone '{}', ignoring it for user {}.", timezone, username);
}
}
final Startpage startpage = cr.startpage();
if (startpage != null) {
user.setStartpage(startpage.type(), startpage.id());
}
if (isPermitted("*")) {
final Long sessionTimeoutMs = cr.sessionTimeoutMs();
if (Objects.nonNull(sessionTimeoutMs) && sessionTimeoutMs != 0 && (user.getSessionTimeoutMs() != sessionTimeoutMs)) {
user.setSessionTimeoutMs(sessionTimeoutMs);
terminateSessions(user);
}
}
if (cr.isServiceAccount() != null) {
user.setServiceAccount(cr.isServiceAccount());
}
userManagementService.update(user, cr);
}
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
changeUser
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 1
|
Analyze the following code function for security vulnerabilities
|
public void unstableProviderDied(IBinder connection) {
ContentProviderConnection conn;
try {
conn = (ContentProviderConnection)connection;
} catch (ClassCastException e) {
String msg ="refContentProvider: " + connection
+ " not a ContentProviderConnection";
Slog.w(TAG, msg);
throw new IllegalArgumentException(msg);
}
if (conn == null) {
throw new NullPointerException("connection is null");
}
// Safely retrieve the content provider associated with the connection.
IContentProvider provider;
synchronized (this) {
provider = conn.provider.provider;
}
if (provider == null) {
// Um, yeah, we're way ahead of you.
return;
}
// Make sure the caller is being honest with us.
if (provider.asBinder().pingBinder()) {
// Er, no, still looks good to us.
synchronized (this) {
Slog.w(TAG, "unstableProviderDied: caller " + Binder.getCallingUid()
+ " says " + conn + " died, but we don't agree");
return;
}
}
// Well look at that! It's dead!
synchronized (this) {
if (conn.provider.provider != provider) {
// But something changed... good enough.
return;
}
ProcessRecord proc = conn.provider.proc;
if (proc == null || proc.thread == null) {
// Seems like the process is already cleaned up.
return;
}
// As far as we're concerned, this is just like receiving a
// death notification... just a bit prematurely.
Slog.i(TAG, "Process " + proc.processName + " (pid " + proc.pid
+ ") early provider death");
final long ident = Binder.clearCallingIdentity();
try {
appDiedLocked(proc);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unstableProviderDied
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
unstableProviderDied
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeArray jsFunction_getGroupIds(Context cx, Scriptable thisObj, Object[] args, Function funObj) {
String response = (String) args[0];
APIConsumer consumer = getAPIConsumer(thisObj);
NativeArray grpIdList = null;
String[] groupIdArray = null;
try {
groupIdArray = consumer.getGroupIds(response);
if (groupIdArray != null) {
grpIdList = new NativeArray(0);
int i = 0;
for (String groupId : groupIdArray) {
grpIdList.put(i, grpIdList, groupId);
i++;
}
return grpIdList;
} else {
return null;
}
} catch (APIManagementException e) {
//This exception should not abort the user flow. If the groupId is not available then
//the flow for which the group id is not required will be run.
log.error("Error occurred while getting group id", e);
}
if (log.isDebugEnabled()) {
log.debug("Group Id List :- " + grpIdList.toString());
}
return grpIdList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getGroupIds
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getGroupIds
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<ParcelablePresence> getUserList(String jid) {
MultiUserChat muc = multiUserChats.get(jid);
if (muc == null) {
return null;
}
Log.d(TAG, "MUC instance: " + jid + " " + muc);
Iterator<String> occIter = muc.getOccupants();
ArrayList<ParcelablePresence> tmpList = new ArrayList<ParcelablePresence>();
while(occIter.hasNext())
tmpList.add(new ParcelablePresence(muc.getOccupantPresence(occIter.next())));
Collections.sort(tmpList, new Comparator<ParcelablePresence>() {
@Override
public int compare(ParcelablePresence lhs, ParcelablePresence rhs) {
return java.text.Collator.getInstance().compare(lhs.resource, rhs.resource);
}
});
Log.d(TAG, "getUserList(" + jid + "): " + tmpList.size());
return tmpList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserList
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
getUserList
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reportSimUnlocked(int subId) {
if (DEBUG_SIM_STATES) Log.v(TAG, "reportSimUnlocked(subId=" + subId + ")");
int slotId = SubscriptionManager.getSlotId(subId);
handleSimStateChange(subId, slotId, State.READY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportSimUnlocked
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
reportSimUnlocked
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KieServicesClient get(String url) {
KieServicesConfiguration configuration = KieServicesFactory.newRestConfiguration(url, getUser(), getPassword());
configuration.setTimeout(60000);
configuration.setMarshallingFormat(MarshallingFormat.JSON);
String authToken = getToken();
if (authToken != null && !authToken.isEmpty()) {
configuration.setCredentialsProvider(new EnteredTokenCredentialsProvider(authToken));
}
KieServicesClient kieServicesClient = KieServicesFactory.newKieServicesClient(configuration);
return kieServicesClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: kie-server-parent/kie-server-controller/kie-server-controller-impl/src/main/java/org/kie/server/controller/impl/client/RestKieServicesClientProvider.java
Repository: kiegroup/droolsjbpm-integration
The code follows secure coding practices.
|
[
"CWE-260"
] |
CVE-2016-7043
|
MEDIUM
| 5
|
kiegroup/droolsjbpm-integration
|
get
|
kie-server-parent/kie-server-controller/kie-server-controller-impl/src/main/java/org/kie/server/controller/impl/client/RestKieServicesClientProvider.java
|
e916032edd47aa46d15f3a11909b4804ee20a7e8
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
List<Pair> params = new ArrayList<Pair>();
// preconditions
if (name == null || name.isEmpty() || value == null) return params;
Collection valueCollection;
if (value instanceof Collection) {
valueCollection = (Collection) value;
} else {
params.add(new Pair(name, parameterToString(value)));
return params;
}
if (valueCollection.isEmpty()){
return params;
}
// get the collection format (default: csv)
String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format
if ("multi".equals(format)) {
for (Object item : valueCollection) {
params.add(new Pair(name, parameterToString(item)));
}
return params;
}
String delimiter = ",";
if ("csv".equals(format)) {
delimiter = ",";
} else if ("ssv".equals(format)) {
delimiter = " ";
} else if ("tsv".equals(format)) {
delimiter = "\t";
} else if ("pipes".equals(format)) {
delimiter = "|";
}
StringBuilder sb = new StringBuilder() ;
for (Object item : valueCollection) {
sb.append(delimiter);
sb.append(parameterToString(item));
}
params.add(new Pair(name, sb.substring(1)));
return params;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parameterToPairs
File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
parameterToPairs
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void getTilesForIntent(Context context, UserHandle user, Intent intent,
Map<Pair<String, String>, Tile> addedCache, String defaultCategory, List<Tile> outTiles,
boolean usePriority, boolean checkCategory) {
PackageManager pm = context.getPackageManager();
List<ResolveInfo> results = pm.queryIntentActivitiesAsUser(intent,
PackageManager.GET_META_DATA, user.getIdentifier());
for (ResolveInfo resolved : results) {
if (!resolved.system) {
// Do not allow any app to add to settings, only system ones.
continue;
}
ActivityInfo activityInfo = resolved.activityInfo;
Bundle metaData = activityInfo.metaData;
String categoryKey = defaultCategory;
if (checkCategory && ((metaData == null) || !metaData.containsKey(EXTRA_CATEGORY_KEY))
&& categoryKey == null) {
Log.w(LOG_TAG, "Found " + resolved.activityInfo.name + " for intent "
+ intent + " missing metadata "
+ (metaData == null ? "" : EXTRA_CATEGORY_KEY));
continue;
} else {
categoryKey = metaData.getString(EXTRA_CATEGORY_KEY);
}
Pair<String, String> key = new Pair<String, String>(activityInfo.packageName,
activityInfo.name);
Tile tile = addedCache.get(key);
if (tile == null) {
tile = new Tile();
tile.intent = new Intent().setClassName(
activityInfo.packageName, activityInfo.name);
tile.category = categoryKey;
tile.priority = usePriority ? resolved.priority : 0;
tile.metaData = activityInfo.metaData;
updateTileData(context, tile, activityInfo, activityInfo.applicationInfo,
pm);
if (DEBUG) Log.d(LOG_TAG, "Adding tile " + tile.title);
addedCache.put(key, tile);
}
if (!tile.userHandle.contains(user)) {
tile.userHandle.add(user);
}
if (!outTiles.contains(tile)) {
outTiles.add(tile);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTilesForIntent
File: packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
getTilesForIntent
|
packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
|
e206f02d46ae5e38c74d138b51f6e1637e261abe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isCheckExternals() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCheckExternals
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
isCheckExternals
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@ParameterizedTest
@MethodSource("testsParameters")
@Order(1)
void registerJohnSmith(boolean useLiveValidation, boolean isModal, TestUtils testUtils) throws Exception
{
AbstractRegistrationPage registrationPage = setUp(testUtils, useLiveValidation, isModal);
assertTrue(validateAndRegister(testUtils, useLiveValidation, isModal, registrationPage));
tryToLoginAsJohnSmith(testUtils, registrationPage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerJohnSmith
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2024-21650
|
CRITICAL
| 9.8
|
xwiki/xwiki-platform
|
registerJohnSmith
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
|
b290bfd573c6f7db6cc15a88dd4111d9fcad0d31
| 0
|
Analyze the following code function for security vulnerabilities
|
public String compact() {
return id.replaceAll("/", "-").replaceAll("\\\\", "-");
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2020-5230
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Limit Characters Allowed In Ids
Opencast allows almost arbitrary identifiers for media packages and
elements to be used. This can be problematic for operation and security
since such identifiers are sometimes used for file system operations
which may lead to attacker being able to escape working directories and
write files to other locations.
In addition, Opencast's `Id.toString(…)` vs `Id.compact(…)` behavior,
the latter trying to mitigate some of the file system problems, can
cause errors due to identifier mismatch since an identifier may
unintentionally change.
This patch limits the characters allowed to be used in identifiers to
ensure no unsafe operations are possible and no mismatch may happen.
Function: compact
File: modules/common/src/main/java/org/opencastproject/mediapackage/identifier/IdImpl.java
Repository: opencast
Fixed Code:
public String compact() {
return toString();
}
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
compact
|
modules/common/src/main/java/org/opencastproject/mediapackage/identifier/IdImpl.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 1
|
Analyze the following code function for security vulnerabilities
|
private MutableHttpResponse<?> encodeBodyWithCodec(MutableHttpResponse<?> response,
Object body,
MediaTypeCodec codec,
MediaType mediaType,
ChannelHandlerContext context,
AtomicReference<HttpRequest<?>> requestReference) {
ByteBuf byteBuf;
try {
byteBuf = encodeBodyAsByteBuf(body, codec, context, requestReference);
int len = byteBuf.readableBytes();
MutableHttpHeaders headers = response.getHeaders();
if (!headers.contains(HttpHeaders.CONTENT_TYPE)) {
headers.add(HttpHeaderNames.CONTENT_TYPE, mediaType);
}
headers.remove(HttpHeaders.CONTENT_LENGTH);
headers.add(HttpHeaderNames.CONTENT_LENGTH, String.valueOf(len));
setBodyContent(response, byteBuf);
return response;
} catch (LinkageError e) {
// rxjava swallows linkage errors for some reasons so if one occurs, rethrow as a internal error
throw new InternalServerException("Fatal error encoding bytebuf: " + e.getMessage() , e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodeBodyWithCodec
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
encodeBodyWithCodec
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getCrossProfilePackagesForAdmins(List<ActiveAdmin> admins) {
final List<String> packages = new ArrayList<>();
for (int i = 0; i < admins.size(); i++) {
packages.addAll(admins.get(i).mCrossProfilePackages);
}
return packages;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfilePackagesForAdmins
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getCrossProfilePackagesForAdmins
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processProfileServiceStateChanged(String serviceName, int state) {
boolean doUpdate=false;
boolean isBleTurningOn;
boolean isBleTurningOff;
boolean isTurningOn;
boolean isTurningOff;
synchronized (mProfileServicesState) {
Integer prevState = mProfileServicesState.get(serviceName);
if (prevState != null && prevState != state) {
mProfileServicesState.put(serviceName,state);
doUpdate=true;
}
}
debugLog("onProfileServiceStateChange() serviceName=" + serviceName
+ ", state=" + state +", doUpdate=" + doUpdate);
if (!doUpdate) {
return;
}
synchronized (mAdapterStateMachine) {
isTurningOff = mAdapterStateMachine.isTurningOff();
isTurningOn = mAdapterStateMachine.isTurningOn();
isBleTurningOn = mAdapterStateMachine.isBleTurningOn();
isBleTurningOff = mAdapterStateMachine.isBleTurningOff();
}
debugLog("processProfileServiceStateChanged() - serviceName=" + serviceName +
" isTurningOn=" + isTurningOn + " isTurningOff=" + isTurningOff +
" isBleTurningOn=" + isBleTurningOn + " isBleTurningOff=" + isBleTurningOff);
if (isBleTurningOn) {
if (serviceName.equals("com.android.bluetooth.gatt.GattService")) {
debugLog("GattService is started");
mAdapterStateMachine.sendMessage(mAdapterStateMachine.obtainMessage(AdapterState.BLE_STARTED));
return;
}
} else if(isBleTurningOff) {
if (serviceName.equals("com.android.bluetooth.gatt.GattService")) {
debugLog("GattService stopped");
mAdapterStateMachine.sendMessage(mAdapterStateMachine.obtainMessage(AdapterState.BLE_STOPPED));
return;
}
} else if (isTurningOff) {
//On to BLE_ON
//Process stop or disable pending
//Check if all services are stopped if so, do cleanup
synchronized (mProfileServicesState) {
Iterator<Map.Entry<String,Integer>> i = mProfileServicesState.entrySet().iterator();
while (i.hasNext()) {
Map.Entry<String,Integer> entry = i.next();
debugLog("Service: " + entry.getKey());
if (entry.getKey().equals("com.android.bluetooth.gatt.GattService")) {
debugLog("Skip GATT service - already started before");
continue;
}
if (BluetoothAdapter.STATE_OFF != entry.getValue()) {
debugLog("onProfileServiceStateChange() - Profile still running: "
+ entry.getKey());
return;
}
}
}
debugLog("onProfileServiceStateChange() - All profile services stopped...");
//Send message to state machine
mProfilesStarted=false;
mAdapterStateMachine.sendMessage(mAdapterStateMachine.obtainMessage(AdapterState.BREDR_STOPPED));
} else if (isTurningOn) {
updateInteropDatabase();
//Process start pending
//Check if all services are started if so, update state
synchronized (mProfileServicesState) {
Iterator<Map.Entry<String,Integer>> i = mProfileServicesState.entrySet().iterator();
while (i.hasNext()) {
Map.Entry<String,Integer> entry = i.next();
debugLog("Service: " + entry.getKey());
if (entry.getKey().equals("com.android.bluetooth.gatt.GattService")) {
debugLog("Skip GATT service - already started before");
continue;
}
if (BluetoothAdapter.STATE_ON != entry.getValue()) {
debugLog("onProfileServiceStateChange() - Profile still not running:"
+ entry.getKey());
return;
}
}
}
debugLog("onProfileServiceStateChange() - All profile services started.");
mProfilesStarted=true;
//Send message to state machine
mAdapterStateMachine.sendMessage(mAdapterStateMachine.obtainMessage(AdapterState.BREDR_STARTED));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processProfileServiceStateChanged
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
processProfileServiceStateChanged
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void subtractTouchExcludeRegionIfNeeded(Region touchableRegion) {
if (mTapExcludeRegion.isEmpty()) {
return;
}
final Region touchExcludeRegion = Region.obtain();
getTapExcludeRegion(touchExcludeRegion);
if (!touchExcludeRegion.isEmpty()) {
touchableRegion.op(touchExcludeRegion, Region.Op.DIFFERENCE);
}
touchExcludeRegion.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: subtractTouchExcludeRegionIfNeeded
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
subtractTouchExcludeRegionIfNeeded
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getConnectionTimeout()
{
return mConnectionTimeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectionTimeout
File: src/main/java/com/neovisionaries/ws/client/SocketConnector.java
Repository: TakahikoKawasaki/nv-websocket-client
The code follows secure coding practices.
|
[
"CWE-295"
] |
CVE-2017-1000209
|
MEDIUM
| 4.3
|
TakahikoKawasaki/nv-websocket-client
|
getConnectionTimeout
|
src/main/java/com/neovisionaries/ws/client/SocketConnector.java
|
feb9c8302757fd279f4cfc99cbcdfb6ee709402d
| 0
|
Analyze the following code function for security vulnerabilities
|
void continueUserSwitch(UserState uss, int oldUserId, int newUserId) {
completeSwitchAndInitialize(uss, newUserId, false, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: continueUserSwitch
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
continueUserSwitch
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean checkObjectExecutePermission(Class clazz, String methodName)
{
if (Class.class.isAssignableFrom(clazz) && methodName != null && this.secureClassMethods.contains(methodName)) {
return true;
} else {
return super.checkObjectExecutePermission(clazz, methodName);
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-24897
- Severity: MEDIUM
- CVSS Score: 6.0
Description: XWIKI-5168: Don't allow some methods in velocity introspector (#127)
Function: checkObjectExecutePermission
File: xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/SecureIntrospector.java
Repository: xwiki/xwiki-commons
Fixed Code:
@Override
public boolean checkObjectExecutePermission(Class clazz, String methodName)
{
Boolean result = null;
if (methodName != null) {
for (Map.Entry<Class, Set<String>> classSetEntry : this.whitelistedMethods.entrySet()) {
if (classSetEntry.getKey().isAssignableFrom(clazz)) {
result = classSetEntry.getValue().contains(methodName.toLowerCase());
break;
}
}
}
if (result == null) {
result = super.checkObjectExecutePermission(clazz, methodName);
}
return result;
}
|
[
"CWE-22"
] |
CVE-2022-24897
|
MEDIUM
| 6
|
xwiki/xwiki-commons
|
checkObjectExecutePermission
|
xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/SecureIntrospector.java
|
215951cfb0f808d0bf5b1097c9e7d1e503449ab8
| 1
|
Analyze the following code function for security vulnerabilities
|
private static int getRequestingUserId(Bundle args) {
final int callingUserId = UserHandle.getCallingUserId();
return (args != null) ? args.getInt(Settings.CALL_METHOD_USER_KEY, callingUserId)
: callingUserId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestingUserId
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
getRequestingUserId
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public final void addActivity(PackageParser.Activity a, String type) {
final boolean systemApp = a.info.applicationInfo.isSystemApp();
mActivities.put(a.getComponentName(), a);
if (DEBUG_SHOW_INFO)
Log.v(
TAG, " " + type + " " +
(a.info.nonLocalizedLabel != null ? a.info.nonLocalizedLabel : a.info.name) + ":");
if (DEBUG_SHOW_INFO)
Log.v(TAG, " Class=" + a.info.name);
final int NI = a.intents.size();
for (int j=0; j<NI; j++) {
PackageParser.ActivityIntentInfo intent = a.intents.get(j);
if (!systemApp && intent.getPriority() > 0 && "activity".equals(type)) {
intent.setPriority(0);
Log.w(TAG, "Package " + a.info.applicationInfo.packageName + " has activity "
+ a.className + " with priority > 0, forcing to 0");
}
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
if (!intent.debugCheck()) {
Log.w(TAG, "==> For Activity " + a.info.name);
}
addFilter(intent);
}
}
|
Vulnerability Classification:
- CWE: CWE-119
- CVE: CVE-2016-2497
- Severity: HIGH
- CVSS Score: 7.5
Description: DO NOT MERGE Fix intent filter priorities
Since this is a backport, there is only one rule that guards intent
filter priorities:
1) Updates will NOT be granted a priority greater than the priority
defined on the system image.
Bug: 27450489
Change-Id: Ifcec4d7a59e684331399abc41eea1bd6876155a4
Function: addActivity
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
Fixed Code:
public final void addActivity(PackageParser.Activity a, String type) {
final boolean systemApp = a.info.applicationInfo.isSystemApp();
mActivities.put(a.getComponentName(), a);
if (DEBUG_SHOW_INFO)
Log.v(
TAG, " " + type + " " +
(a.info.nonLocalizedLabel != null ? a.info.nonLocalizedLabel : a.info.name) + ":");
if (DEBUG_SHOW_INFO)
Log.v(TAG, " Class=" + a.info.name);
final int NI = a.intents.size();
for (int j=0; j<NI; j++) {
PackageParser.ActivityIntentInfo intent = a.intents.get(j);
if ("activity".equals(type)) {
final PackageSetting ps =
mSettings.getDisabledSystemPkgLPr(intent.activity.info.packageName);
final List<PackageParser.Activity> systemActivities =
ps != null && ps.pkg != null ? ps.pkg.activities : null;
adjustPriority(systemActivities, intent);
}
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
if (!intent.debugCheck()) {
Log.w(TAG, "==> For Activity " + a.info.name);
}
addFilter(intent);
}
}
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
addActivity
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 1
|
Analyze the following code function for security vulnerabilities
|
public static Object ifThenElse(boolean cond, Object thenValue, Object elseValue) {
return cond ? thenValue : elseValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ifThenElse
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
ifThenElse
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
private TimeZone findTimeZone(int offset, boolean dst, long when) {
int rawOffset = offset;
if (dst) {
rawOffset -= 3600000;
}
String[] zones = TimeZone.getAvailableIDs(rawOffset);
TimeZone guess = null;
Date d = new Date(when);
for (String zone : zones) {
TimeZone tz = TimeZone.getTimeZone(zone);
if (tz.getOffset(when) == offset &&
tz.inDaylightTime(d) == dst) {
guess = tz;
break;
}
}
return guess;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findTimeZone
File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
findTimeZone
|
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getLocalName() {
return doc.getLocalName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocalName
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getLocalName
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayRendered(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context)
throws XWikiException
{
String result = pclass.displayView(pclass.getName(), prefix, object, context);
return getRenderedContent(result, Syntax.XWIKI_1_0.toIdString(), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayRendered
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
displayRendered
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSnapshotDisabled() {
return snapshotDisabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSnapshotDisabled
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
isSnapshotDisabled
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onNoDeal(SSLEngine engine) {
GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::onNoDeal");
final Connection connection = NextProtoNegSupport.getConnection(engine);
connection.closeSilently();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNoDeal
File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
onNoDeal
|
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Consumes(MediaType.APPLICATION_XML)
public Response addUser(@Context final SecurityContext securityContext, @Context final UriInfo uriInfo, final OnmsUser user, @QueryParam("hashPassword") final boolean hashPassword) {
writeLock();
try {
if (!hasEditRights(securityContext)) {
throw getException(Status.BAD_REQUEST, "User {} does not have write access to users!", securityContext.getUserPrincipal().getName());
}
LOG.debug("addUser: Adding user {}", user);
try {
if (hashPassword) hashPassword(user);
m_userManager.save(user);
} catch (final Throwable t) {
throw getException(Status.INTERNAL_SERVER_ERROR, t);
}
return Response.created(getRedirectUri(uriInfo, user.getUsername())).build();
} finally {
writeUnlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addUser
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-0872
|
HIGH
| 8
|
OpenNMS/opennms
|
addUser
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
|
34ab169a74b2bc489ab06d0dbf33fee1ed94c93c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCellStyleGenerator(CellStyleGenerator cellStyleGenerator) {
this.cellStyleGenerator = cellStyleGenerator;
datasourceExtension.refreshCache();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCellStyleGenerator
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setCellStyleGenerator
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onTabChanged() {
@DrawableRes final int fabDrawable;
if (binding.startConversationViewPager.getCurrentItem() == 0) {
fabDrawable = R.drawable.ic_person_add_white_24dp;
} else {
fabDrawable = R.drawable.ic_group_add_white_24dp;
}
binding.fab.setImageResource(fabDrawable);
invalidateOptionsMenu();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTabChanged
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onTabChanged
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String createCriticalNotificationJSON(String caption,
String message, String details, String url) {
return createCriticalNotificationJSON(caption, message, details, url,
null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCriticalNotificationJSON
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
createCriticalNotificationJSON
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void drawLabelComponent(Object nativeGraphics, int cmpX, int cmpY, int cmpHeight, int cmpWidth, Style style, String text, Object icon, Object stateIcon, int preserveSpaceForState, int gap, boolean rtl, boolean isOppositeSide, int textPosition, int stringWidth, boolean isTickerRunning, int tickerShiftText, boolean endsWith3Points, int valign) {
if(AndroidAsyncView.legacyPaintLogic) {
super.drawLabelComponent(nativeGraphics, cmpX, cmpY, cmpHeight, cmpWidth, style, text, icon, stateIcon, preserveSpaceForState, gap, rtl, isOppositeSide, textPosition, stringWidth, isTickerRunning, tickerShiftText, endsWith3Points, valign);
return;
}
((AndroidGraphics)nativeGraphics).drawLabelComponent(cmpX, cmpY, cmpHeight, cmpWidth, style, text,
(Bitmap)icon, (Bitmap)stateIcon, preserveSpaceForState, gap, rtl, isOppositeSide, textPosition, stringWidth,
isTickerRunning, tickerShiftText, endsWith3Points, valign);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: drawLabelComponent
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
drawLabelComponent
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsString02() throws Exception
{
Duration exp = Duration.ofSeconds(13498L, 8374);
Duration value = READER.readValue('"' + exp.toString() + '"');
assertNotNull("The value should not be null.", value);
assertEquals("The value is not correct.", exp, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsString02
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsString02
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = { "/", "/home" })
public String actionHome(HttpServletRequest theServletRequest, final HomeRequest theRequest, final BindingResult theBindingResult, final ModelMap theModel) {
addCommonParams(theServletRequest, theRequest, theModel);
ourLog.info(theServletRequest.toString());
return "home";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: actionHome
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
actionHome
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpClient getRestClient() {
return restClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRestClient
File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
getRestClient
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object add(TaskDTO queryVO) {
TaskWithBLOBs task = new TaskWithBLOBs();
BeanUtils.copyBean(task, queryVO);
taskMapper.insertSelective(task);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: add
File: rackshift-server/src/main/java/io/rackshift/service/TaskService.java
Repository: fit2cloud/rackshift
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-42405
|
CRITICAL
| 9.8
|
fit2cloud/rackshift
|
add
|
rackshift-server/src/main/java/io/rackshift/service/TaskService.java
|
305aea3b20d36591d519f7d04e0a25be05a51e93
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean createBond(BluetoothDevice device, int transport) {
enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
"Need BLUETOOTH ADMIN permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp != null && deviceProp.getBondState() != BluetoothDevice.BOND_NONE) {
return false;
}
// Pairing is unreliable while scanning, so cancel discovery
// Note, remove this when native stack improves
cancelDiscoveryNative();
Message msg = mBondStateMachine.obtainMessage(BondStateMachine.CREATE_BOND);
msg.obj = device;
msg.arg1 = transport;
mBondStateMachine.sendMessage(msg);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBond
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
createBond
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isFooterVisible() {
return getFooter().isVisible();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFooterVisible
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
isFooterVisible
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
public @Nullable InputStream getUnicodeStream(String columnName) throws SQLException {
return getUnicodeStream(findColumn(columnName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUnicodeStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getUnicodeStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void logOut(Response response) {
clearSessionTok();
removeLoginCookies(response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logOut
File: src/gribbit/auth/User.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
logOut
|
src/gribbit/auth/User.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeAddJavascriptInterface(long nativeContentViewCoreImpl, Object object,
String name, Class requiredAnnotation);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeAddJavascriptInterface
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativeAddJavascriptInterface
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Resource getWorkspaceResource() {
return new Resource(getFullDisplayName()+" workspace");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWorkspaceResource
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getWorkspaceResource
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getElements()
{
return this.elements;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getElements
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getElements
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addComponentDependencies(
Class<? extends Component> componentClass) {
Page page = ui.getPage();
DependencyInfo dependencies = ComponentUtil
.getDependencies(session.getService(), componentClass);
// In npm mode, add external JavaScripts directly to the page.
addExternalDependencies(dependencies);
if (mightHaveChunk(componentClass, dependencies)) {
triggerChunkLoading(componentClass);
}
dependencies.getStyleSheets().forEach(styleSheet -> page
.addStyleSheet(styleSheet.value(), styleSheet.loadMode()));
warnForUnavailableBundledDependencies(componentClass, dependencies);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addComponentDependencies
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
addComponentDependencies
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String toString(final Object object, final String tagName, int indentFactor) {
return toString(object, tagName, XMLParserConfiguration.ORIGINAL, indentFactor);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: src/main/java/org/json/XML.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45688
|
HIGH
| 7.5
|
stleary/JSON-java
|
toString
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sessionDestroyed(HttpSessionEvent event) {
// no op
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sessionDestroyed
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiVaadinInitialization.java
Repository: vaadin/osgi
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
sessionDestroyed
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiVaadinInitialization.java
|
0b82a606eeafdf56a129630f00b9c55a5177b64b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean onMenuPressed() {
if (shouldUnlockOnMenuPressed()) {
animateCollapsePanels(
CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL /* flags */, true /* force */);
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMenuPressed
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onMenuPressed
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native @Nullable ParcelFileDescriptor nativeOpenNonAssetFd(long ptr, int cookie,
@NonNull String fileName, @NonNull long[] outOffsets) throws IOException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeOpenNonAssetFd
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeOpenNonAssetFd
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Nonnull
public <E extends KrailEntity<ID, VER>> String entityName(@Nonnull Class<E> entityClass) {
checkNotNull(entityClass);
// Get the @Entity annotation to check for name change
Entity t = entityClass.getAnnotation(Entity.class);
//If no Table annotation use the default (simple class name)
return t.name()
.isEmpty() ? entityClass.getSimpleName() : t.name();
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-15018
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Fix #18 SQLInjection vulnerability cleared
Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.
Function: entityName
File: src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
Repository: KrailOrg/krail-jpa
Fixed Code:
@Override
@Nonnull
public final <E extends KrailEntity<ID, VER>> String entityName(@Nonnull Class<E> entityClass) {
checkNotNull(entityClass);
// Get the @Entity annotation to check for name change
Entity t = entityClass.getAnnotation(Entity.class);
//If no Table annotation use the default (simple class name)
return t.name()
.isEmpty() ? entityClass.getSimpleName() : t.name();
}
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
entityName
|
src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeOnPermissionsChangeListener(IOnPermissionsChangeListener listener) {
synchronized (mPackages) {
mOnPermissionChangeListeners.removeListenerLocked(listener);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeOnPermissionsChangeListener
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
removeOnPermissionsChangeListener
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setWebSocketIdleTimeoutInMs(int webSocketIdleTimeoutInMs) {
this.webSocketIdleTimeoutInMs = webSocketIdleTimeoutInMs;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWebSocketIdleTimeoutInMs
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setWebSocketIdleTimeoutInMs
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public void bind(int index, String value) {
if (value == null) {
mPreparedStatement.bindNull(index);
} else {
mPreparedStatement.bindString(index, value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bind
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
bind
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateStatusBarIcons() {
boolean showIconsWhenExpanded = isFullWidth() && getExpandedHeight() < getOpeningHeight();
if (showIconsWhenExpanded && mNoVisibleNotifications && isOnKeyguard()) {
showIconsWhenExpanded = false;
}
if (showIconsWhenExpanded != mShowIconsWhenExpanded) {
mShowIconsWhenExpanded = showIconsWhenExpanded;
mStatusBar.recomputeDisableFlags(false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateStatusBarIcons
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
updateStatusBarIcons
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsString01() throws Exception
{
Duration exp = Duration.ofSeconds(60L, 0);
Duration value = READER.readValue('"' + exp.toString() + '"');
assertNotNull("The value should not be null.", value);
assertEquals("The value is not correct.", exp, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsString01
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsString01
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<String> getVirtualWikisDatabaseNames(XWikiContext context) throws XWikiException
{
WikiDescriptorManager descriptorManager = Utils.getComponent(WikiDescriptorManager.class);
try {
return new ArrayList<String>(descriptorManager.getAllIds());
} catch (WikiManagerException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI, XWikiException.ERROR_XWIKI_UNKNOWN,
"Failed to get the list of wikis", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVirtualWikisDatabaseNames
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getVirtualWikisDatabaseNames
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logStrictModeViolationToDropBox(
ProcessRecord process,
StrictMode.ViolationInfo info) {
if (info == null) {
return;
}
final boolean isSystemApp = process == null ||
(process.info.flags & (ApplicationInfo.FLAG_SYSTEM |
ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0;
final String processName = process == null ? "unknown" : process.processName;
final DropBoxManager dbox = (DropBoxManager)
mContext.getSystemService(Context.DROPBOX_SERVICE);
// Exit early if the dropbox isn't configured to accept this report type.
final String dropboxTag = processClass(process) + "_strictmode";
if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return;
final StringBuilder sb = new StringBuilder(1024);
synchronized (sb) {
appendDropBoxProcessHeaders(process, processName, sb);
sb.append("Build: ").append(Build.FINGERPRINT).append("\n");
sb.append("System-App: ").append(isSystemApp).append("\n");
sb.append("Uptime-Millis: ").append(info.violationUptimeMillis).append("\n");
if (info.violationNumThisLoop != 0) {
sb.append("Loop-Violation-Number: ").append(info.violationNumThisLoop).append("\n");
}
if (info.numAnimationsRunning != 0) {
sb.append("Animations-Running: ").append(info.numAnimationsRunning).append("\n");
}
if (info.broadcastIntentAction != null) {
sb.append("Broadcast-Intent-Action: ").append(info.broadcastIntentAction).append("\n");
}
if (info.durationMillis != -1) {
sb.append("Duration-Millis: ").append(info.durationMillis).append("\n");
}
if (info.numInstances != -1) {
sb.append("Instance-Count: ").append(info.numInstances).append("\n");
}
if (info.tags != null) {
for (String tag : info.tags) {
sb.append("Span-Tag: ").append(tag).append("\n");
}
}
sb.append("\n");
sb.append(info.getStackTrace());
sb.append("\n");
if (info.getViolationDetails() != null) {
sb.append(info.getViolationDetails());
sb.append("\n");
}
}
final String res = sb.toString();
IoThread.getHandler().post(() -> {
dbox.addText(dropboxTag, res);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logStrictModeViolationToDropBox
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
logStrictModeViolationToDropBox
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected UserReference getCurrentUser()
{
return this.currentUserReferenceResolver.resolve(CurrentUserReference.INSTANCE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentUser
File: application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/handlers/AbstractChangeRequestActionHandler.java
Repository: xwiki-contrib/application-changerequest
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-49280
|
MEDIUM
| 6.5
|
xwiki-contrib/application-changerequest
|
getCurrentUser
|
application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/handlers/AbstractChangeRequestActionHandler.java
|
ff0f5368ea04f0e4aa7b33821c707dc68a8c5ca8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Configuration forceStackToFullscreen(int stackId, boolean forceFullscreen) {
synchronized (mWindowMap) {
final TaskStack stack = mStackIdToStack.get(stackId);
if (stack == null) {
throw new IllegalArgumentException("resizeStack: stackId " + stackId
+ " not found.");
}
if (stack.forceFullscreen(forceFullscreen)) {
stack.resizeWindows();
stack.getDisplayContent().layoutNeeded = true;
performLayoutAndPlaceSurfacesLocked();
}
return new Configuration(stack.mOverrideConfig);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceStackToFullscreen
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
forceStackToFullscreen
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable int[] getResourceIntArray(@ArrayRes int resId) {
synchronized (this) {
ensureValidLocked();
return nativeGetResourceIntArray(mObject, resId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceIntArray
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getResourceIntArray
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reset() {
synchronized (mDone) {
mDone.set(false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reset
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
reset
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public void denyTypes(Class[] types) {
denyPermission(new ExplicitTypePermission(types));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: denyTypes
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
denyTypes
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logWrap(ByteBuffer dst) {
if (debug_port <= 0 || dst == null || dst.remaining() == 0) {
return;
}
loggingSocketConsumeAllBytes();
OutputStream stream = s_ostream;
if (!as_server) {
// A wrap from the client means we write data to the outbound
// side of the client socket.
stream = c_ostream;
}
WritableByteChannel channel = Channels.newChannel(stream);
int pos = dst.position();
try {
dst.flip();
debug("JSSEngine: logWrap() - writing " + dst.remaining() + " bytes.");
channel.write(dst);
stream.flush();
dst.flip();
} catch (Exception e) {
throw new RuntimeException("Unable to log contents of wrap's dst to debug socket: " + e.getMessage(), e);
} finally {
dst.position(pos);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logWrap
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
logWrap
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate[] findByUuid_PrevAndNext(long kbTemplateId, String uuid,
OrderByComparator<KBTemplate> orderByComparator)
throws NoSuchTemplateException {
KBTemplate kbTemplate = findByPrimaryKey(kbTemplateId);
Session session = null;
try {
session = openSession();
KBTemplate[] array = new KBTemplateImpl[3];
array[0] = getByUuid_PrevAndNext(session, kbTemplate, uuid,
orderByComparator, true);
array[1] = kbTemplate;
array[2] = getByUuid_PrevAndNext(session, kbTemplate, uuid,
orderByComparator, false);
return array;
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByUuid_PrevAndNext
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
findByUuid_PrevAndNext
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.