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
|
@Override
public int getSocketAvailableInput(Object socket) {
return ((SocketImpl)socket).getAvailableInput();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSocketAvailableInput
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
|
getSocketAvailableInput
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
int getRemoteType(BluetoothDevice device) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp == null) return BluetoothDevice.DEVICE_TYPE_UNKNOWN;
return deviceProp.getDeviceType();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteType
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
|
getRemoteType
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long forceSecurityLogs() {
Preconditions.checkCallAuthorization(isAdb(getCallerIdentity())
|| hasCallingOrSelfPermission(permission.FORCE_DEVICE_POLICY_MANAGER_LOGS),
"Caller must be shell or hold FORCE_DEVICE_POLICY_MANAGER_LOGS to call "
+ "forceSecurityLogs");
if (!mInjector.securityLogGetLoggingEnabledProperty()) {
throw new IllegalStateException("logging is not available");
}
return mSecurityLogMonitor.forceLogs();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceSecurityLogs
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
|
forceSecurityLogs
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean shouldCheckIfDelegatePackageIsInstalled(String delegatePackage,
int targetSdk, List<String> scopes) {
// 1) Never skip is installed check from N.
if (targetSdk >= Build.VERSION_CODES.N) {
return true;
}
// 2) Skip if DELEGATION_CERT_INSTALL is the only scope being given.
if (scopes.size() == 1 && scopes.get(0).equals(DELEGATION_CERT_INSTALL)) {
return false;
}
// 3) Skip if all previously granted scopes are being cleared.
if (scopes.isEmpty()) {
return false;
}
// Otherwise it should check that delegatePackage is installed.
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldCheckIfDelegatePackageIsInstalled
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
|
shouldCheckIfDelegatePackageIsInstalled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<String, Integer> getPackagesAndVisibilityForAccount(Account account) {
Objects.requireNonNull(account, "account cannot be null");
int callingUid = Binder.getCallingUid();
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)
&& !isSystemUid(callingUid)) {
String msg =
String.format("uid %s cannot get secrets for account %s", callingUid, account);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
synchronized (accounts.dbLock) {
synchronized (accounts.cacheLock) {
return getPackagesAndVisibilityForAccountLocked(account, accounts);
}
}
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackagesAndVisibilityForAccount
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getPackagesAndVisibilityForAccount
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setKeyPairCertificate(ComponentName who, String callerPackage, String alias,
byte[] cert, byte[] chain, boolean isUserSelectable) {
final CallerIdentity caller = getCallerIdentity(who, callerPackage);
final boolean isCallerDelegate = isCallerDelegate(caller, DELEGATION_CERT_INSTALL);
final boolean isCredentialManagementApp = isCredentialManagementApp(caller);
if (isPermissionCheckFlagEnabled()) {
Preconditions.checkCallAuthorization(
hasPermission(MANAGE_DEVICE_POLICY_CERTIFICATES,
caller.getPackageName(), caller.getUserId())
|| isCredentialManagementApp);
} else {
Preconditions.checkCallAuthorization((caller.hasAdminComponent()
&& (isProfileOwner(caller) || isDefaultDeviceOwner(caller)))
|| (caller.hasPackage() && (isCallerDelegate || isCredentialManagementApp)));
}
if (isCredentialManagementApp) {
Preconditions.checkCallAuthorization(
isAliasInCredentialManagementAppPolicy(caller, alias),
CREDENTIAL_MANAGEMENT_APP_INVALID_ALIAS_MSG);
}
final long id = mInjector.binderClearCallingIdentity();
try (final KeyChainConnection keyChainConnection =
KeyChain.bindAsUser(mContext, caller.getUserHandle())) {
IKeyChainService keyChain = keyChainConnection.getService();
if (!keyChain.setKeyPairCertificate(alias, cert, chain)) {
return false;
}
keyChain.setUserSelectable(alias, isUserSelectable);
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_KEY_PAIR_CERTIFICATE)
.setAdmin(caller.getPackageName())
.setBoolean(/* isDelegate */ isCallerDelegate)
.setStrings(isCredentialManagementApp
? CREDENTIAL_MANAGEMENT_APP : NOT_CREDENTIAL_MANAGEMENT_APP)
.write();
return true;
} catch (InterruptedException e) {
Slogf.w(LOG_TAG, "Interrupted while setting keypair certificate", e);
Thread.currentThread().interrupt();
} catch (RemoteException e) {
Slogf.e(LOG_TAG, "Failed setting keypair certificate", e);
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyPairCertificate
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
|
setKeyPairCertificate
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
void cancelAllLocked(int callingUid, int callingPid, int userId, int reason,
ManagedServiceInfo listener, boolean includeCurrentProfiles) {
String listenerName = listener == null ? null : listener.component.toShortString();
EventLogTags.writeNotificationCancelAll(callingUid, callingPid,
null, userId, 0, 0, reason, listenerName);
ArrayList<NotificationRecord> canceledNotifications = null;
final int N = mNotificationList.size();
for (int i=N-1; i>=0; i--) {
NotificationRecord r = mNotificationList.get(i);
if (includeCurrentProfiles) {
if (!notificationMatchesCurrentProfiles(r, userId)) {
continue;
}
} else {
if (!notificationMatchesUserId(r, userId)) {
continue;
}
}
if ((r.getFlags() & (Notification.FLAG_ONGOING_EVENT
| Notification.FLAG_NO_CLEAR)) == 0) {
mNotificationList.remove(i);
cancelNotificationLocked(r, true, reason);
// Make a note so we can cancel children later.
if (canceledNotifications == null) {
canceledNotifications = new ArrayList<>();
}
canceledNotifications.add(r);
}
}
int M = canceledNotifications != null ? canceledNotifications.size() : 0;
for (int i = 0; i < M; i++) {
cancelGroupChildrenLocked(canceledNotifications.get(i), callingUid, callingPid,
listenerName, REASON_GROUP_SUMMARY_CANCELED, false /* sendDelete */);
}
updateLightsLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelAllLocked
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
cancelAllLocked
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean runsModal() {
// this controller has its own modal dialog box
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runsModal
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
runsModal
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setURLPrefix(String newURLPrefix)
{
RestTestUtils.urlPrefix = newURLPrefix;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setURLPrefix
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setURLPrefix
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
boolean requireFull, String name, String callerPackage) {
return handleIncomingUser(callingPid, callingUid, userId, allowAll,
requireFull ? ALLOW_FULL_ONLY : ALLOW_NON_FULL, name, callerPackage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleIncomingUser
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
|
handleIncomingUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModalDialog setCloseButtonTooltip(final IModel<String> tooltipTitle, final IModel<String> tooltipContent)
{
WicketUtils.addTooltip(this.closeButtonPanel.getButton(), tooltipTitle, tooltipContent);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCloseButtonTooltip
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
setCloseButtonTooltip
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean needsKeyStoreAccess() {
return ((mCredentials.hasKeyPair() || mCredentials.hasUserCertificate())
&& !mKeyStore.isUnlocked());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: needsKeyStoreAccess
File: src/com/android/certinstaller/CertInstaller.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
needsKeyStoreAccess
|
src/com/android/certinstaller/CertInstaller.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setMinAppWidgetIdLocked(int userId, int minWidgetId) {
final int nextAppWidgetId = peekNextAppWidgetIdLocked(userId);
if (nextAppWidgetId < minWidgetId) {
mNextAppWidgetIds.put(userId, minWidgetId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMinAppWidgetIdLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
setMinAppWidgetIdLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCreationDate(Date date)
{
if ((date != null) && (!date.equals(this.creationDate))) {
setMetaDataDirty(true);
}
// Make sure we drop milliseconds for consistency with the database
if (date != null) {
date.setTime((date.getTime() / 1000) * 1000);
}
this.creationDate = date;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCreationDate
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
|
setCreationDate
|
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 static byte[] getStreamBytesRaw(PRStream stream) throws IOException {
RandomAccessFileOrArray rf = stream.getReader().getSafeFile();
try {
rf.reOpen();
return getStreamBytesRaw(stream, rf);
}
finally {
try{rf.close();}catch(Exception e){}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStreamBytesRaw
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getStreamBytesRaw
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRemoteUser() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteUser
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getRemoteUser
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public void save(AsyncResult<SQLConnection> sqlConnection, String table, String id, Object entity,
boolean returnId, boolean upsert, boolean convertEntity,
Handler<AsyncResult<String>> replyHandler) {
if (log.isDebugEnabled()) {
log.debug("save (with connection and id) called on " + table);
}
try {
if (sqlConnection.failed()) {
replyHandler.handle(Future.failedFuture(sqlConnection.cause()));
return;
}
long start = System.nanoTime();
String sql = INSERT_CLAUSE + schemaName + DOT + table
+ " (id, jsonb) VALUES (?, " + (convertEntity ? "?::JSON" : "?::text") + ")"
+ (upsert ? " ON CONFLICT (id) DO UPDATE SET jsonb=EXCLUDED.jsonb" : "")
+ " RETURNING " + (returnId ? "id" : "''");
JsonArray jsonArray = new JsonArray()
.add(id == null ? UUID.randomUUID().toString() : id)
.add(convertEntity ? pojo2json(entity) : ((JsonArray)entity).getBinary(0));
sqlConnection.result().queryWithParams(sql, jsonArray, query -> {
statsTracker(SAVE_STAT_METHOD, table, start);
if (query.failed()) {
replyHandler.handle(Future.failedFuture(query.cause()));
} else {
replyHandler.handle(Future.succeededFuture(query.result().getResults().get(0).getValue(0).toString()));
}
});
} catch (Exception e) {
log.error(e.getMessage(), e);
replyHandler.handle(Future.failedFuture(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
save
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public String encodeRedirectURL(String url) {
return url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodeRedirectURL
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
encodeRedirectURL
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
private final AnnotationMap collectAnnotations(AnnotatedElement main, AnnotatedElement mixin) {
AnnotationCollector c = collectAnnotations(main.getDeclaredAnnotations());
if (mixin != null) {
c = collectAnnotations(c, mixin.getDeclaredAnnotations());
}
return c.asAnnotationMap();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectAnnotations
File: src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
collectAnnotations
|
src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void get(String table, Class<T> clazz, Criterion filter, boolean returnCount, boolean setId,
Handler<AsyncResult<Results<T>>> replyHandler) {
get(table, clazz, filter, returnCount, setId, null, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
get
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setRoamingOff() {
mNewSS.setVoiceRoaming(false);
mNewSS.setDataRoaming(false);
mNewSS.setCdmaEriIconIndex(EriInfo.ROAMING_INDICATOR_OFF);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRoamingOff
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
setRoamingOff
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setWarmCacheEntries(List<WarmCacheEntry> theWarmCacheEntries) {
myWarmCacheEntries = theWarmCacheEntries;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWarmCacheEntries
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setWarmCacheEntries
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setListening(boolean listening) {
if (listening == mListening) {
return;
}
mHeaderQsPanel.setListening(listening);
mListening = listening;
updateListeners();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setListening
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3886
|
HIGH
| 7.2
|
android
|
setListening
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
|
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unbindFinished(IBinder token, Intent intent, boolean doRebind) {
// Refuse possible leaked file descriptors
if (intent != null && intent.hasFileDescriptors() == true) {
throw new IllegalArgumentException("File descriptors passed in Intent");
}
synchronized(this) {
mServices.unbindFinishedLocked((ServiceRecord)token, intent, doRebind);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindFinished
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
|
unbindFinished
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SaServletFilter setIncludeList(List<String> pathList) {
includeList = pathList;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIncludeList
File: sa-token-starter/sa-token-spring-boot-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
setIncludeList
|
sa-token-starter/sa-token-spring-boot-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
private static List<File> getSqlFileList(String basePath) {
File file = new File(basePath);
List<File> fileList = new ArrayList<>();
if (file.exists() && file.isDirectory()) {
File[] fs = file.listFiles();
if (fs != null && fs.length > 0) {
fileList = Arrays.asList(fs);
fileList.sort(Comparator.comparingInt(e -> Integer.valueOf(e.getName().replace(".sql", ""))));
}
}
return fileList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSqlFileList
File: common/src/main/java/com/zrlog/util/ZrLogUtil.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getSqlFileList
|
common/src/main/java/com/zrlog/util/ZrLogUtil.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest multipart(final boolean multipart) {
this.multipart = multipart;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: multipart
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
multipart
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private PendingIntent getLockoutResetIntent() {
return PendingIntent.getBroadcast(mContext, 0,
new Intent(ACTION_LOCKOUT_RESET), PendingIntent.FLAG_UPDATE_CURRENT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLockoutResetIntent
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
getLockoutResetIntent
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private SecurityRoles addSecurityRole(SecurityRole securityRole) {
if (securityRole != null) {
this.roles.add(securityRole);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSecurityRole
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
addSecurityRole
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkAccess(Right right, DocumentReference user, EntityReference entity) throws AccessDeniedException
{
if (!checkPreAccess(right)) {
throw new AccessDeniedException(right, user, entity);
}
this.authorizationManager.checkAccess(right, user, getFullReference(entity));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAccess
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
checkAccess
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isInitialized(int userId) {
return (getUserInfo(userId).flags & UserInfo.FLAG_INITIALIZED) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInitialized
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
isInitialized
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Column(name = "parent_id", length = 30)
public String getParentId() {
return this.parentId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-18927
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getParentId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
|
2b411dc2821c69539138aaf7632b938b659a58fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<TxtDnsAnswer> txtLookup(String hostName) throws InterruptedException, ExecutionException {
if (isShutdown()) {
throw new DnsClientNotRunningException();
}
LOG.debug("Attempting to perform TXT lookup for hostname [{}]", hostName);
validateHostName(hostName);
DnsResponse content = null;
try {
content = resolver.query(new DefaultDnsQuestion(hostName, DnsRecordType.TXT)).get(requestTimeout, TimeUnit.MILLISECONDS).content();
int count = content.count(DnsSection.ANSWER);
final ArrayList<TxtDnsAnswer> txtRecords = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
final DnsRecord dnsRecord = content.recordAt(DnsSection.ANSWER, i);
LOG.trace("TXT record [{}] retrieved with content [{}].", i, dnsRecord);
if (dnsRecord instanceof DefaultDnsRawRecord) {
final DefaultDnsRawRecord txtRecord = (DefaultDnsRawRecord) dnsRecord;
final TxtDnsAnswer.Builder dnsAnswerBuilder = TxtDnsAnswer.builder();
final String decodeTxtRecord = decodeTxtRecord(txtRecord);
LOG.trace("The decoded TXT record is [{}]", decodeTxtRecord);
dnsAnswerBuilder.value(decodeTxtRecord)
.dnsTTL(txtRecord.timeToLive())
.build();
txtRecords.add(dnsAnswerBuilder.build());
}
}
return txtRecords;
} catch (TimeoutException e) {
throw new ExecutionException("Resolver future didn't return a result in " + requestTimeout + " ms", e);
} finally {
if (content != null) {
// Must manually release references on content object since the DnsResponse class extends ReferenceCounted
content.release();
}
}
}
|
Vulnerability Classification:
- CWE: CWE-345
- CVE: CVE-2023-41045
- Severity: MEDIUM
- CVSS Score: 5.3
Description: Merge pull request from GHSA-g96c-x7rh-99r3
* Add support for randomizing DNS Lookup source port
* Clarify purpose of lease
* Skip initial refresh
Previously, the pool was being refreshed immediately upon initialization. Now, the refresh waits until the `poolRefreshSeconds` duration has elapsed.
* Ensure thread safety, skip unused poller refreshes
* Add change log
Function: txtLookup
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
Fixed Code:
public List<TxtDnsAnswer> txtLookup(String hostName) throws InterruptedException, ExecutionException {
if (resolverPool.isStopped()) {
throw new DnsClientNotRunningException();
}
LOG.debug("Attempting to perform TXT lookup for hostname [{}]", hostName);
validateHostName(hostName);
DnsResponse content = null;
final ResolverLease resolverLease = resolverPool.takeLease();
try {
content = resolverLease.getResolver().query(new DefaultDnsQuestion(hostName, DnsRecordType.TXT)).get(requestTimeout, TimeUnit.MILLISECONDS).content();
int count = content.count(DnsSection.ANSWER);
final ArrayList<TxtDnsAnswer> txtRecords = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
final DnsRecord dnsRecord = content.recordAt(DnsSection.ANSWER, i);
LOG.trace("TXT record [{}] retrieved with content [{}].", i, dnsRecord);
if (dnsRecord instanceof DefaultDnsRawRecord) {
final DefaultDnsRawRecord txtRecord = (DefaultDnsRawRecord) dnsRecord;
final TxtDnsAnswer.Builder dnsAnswerBuilder = TxtDnsAnswer.builder();
final String decodeTxtRecord = decodeTxtRecord(txtRecord);
LOG.trace("The decoded TXT record is [{}]", decodeTxtRecord);
dnsAnswerBuilder.value(decodeTxtRecord)
.dnsTTL(txtRecord.timeToLive())
.build();
txtRecords.add(dnsAnswerBuilder.build());
}
}
return txtRecords;
} catch (TimeoutException e) {
throw new ExecutionException("Resolver future didn't return a result in " + requestTimeout + " ms", e);
} finally {
if (content != null) {
// Must manually release references on content object since the DnsResponse class extends ReferenceCounted
content.release();
}
resolverPool.returnLease(resolverLease);
}
}
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
txtLookup
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 1
|
Analyze the following code function for security vulnerabilities
|
public float getDpValue() {
return mRightIconVisible ? mValueIfVisible : mValueIfGone;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDpValue
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getDpValue
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean removeDyingProviderLocked(ProcessRecord proc,
ContentProviderRecord cpr, boolean always) {
final boolean inLaunching = mLaunchingProviders.contains(cpr);
if (!inLaunching || always) {
synchronized (cpr) {
cpr.launchingApp = null;
cpr.notifyAll();
}
mProviderMap.removeProviderByClass(cpr.name, UserHandle.getUserId(cpr.uid));
String names[] = cpr.info.authority.split(";");
for (int j = 0; j < names.length; j++) {
mProviderMap.removeProviderByName(names[j], UserHandle.getUserId(cpr.uid));
}
}
for (int i = cpr.connections.size() - 1; i >= 0; i--) {
ContentProviderConnection conn = cpr.connections.get(i);
if (conn.waiting) {
// If this connection is waiting for the provider, then we don't
// need to mess with its process unless we are always removing
// or for some reason the provider is not currently launching.
if (inLaunching && !always) {
continue;
}
}
ProcessRecord capp = conn.client;
conn.dead = true;
if (conn.stableCount > 0) {
if (!capp.persistent && capp.thread != null
&& capp.pid != 0
&& capp.pid != MY_PID) {
capp.kill("depends on provider "
+ cpr.name.flattenToShortString()
+ " in dying proc " + (proc != null ? proc.processName : "??"), true);
}
} else if (capp.thread != null && conn.provider.provider != null) {
try {
capp.thread.unstableProviderDied(conn.provider.provider.asBinder());
} catch (RemoteException e) {
}
// In the protocol here, we don't expect the client to correctly
// clean up this connection, we'll just remove it.
cpr.connections.remove(i);
if (conn.client.conProviders.remove(conn)) {
stopAssociationLocked(capp.uid, capp.processName, cpr.uid, cpr.name);
}
}
}
if (inLaunching && always) {
mLaunchingProviders.remove(cpr);
}
return inLaunching;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDyingProviderLocked
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
|
removeDyingProviderLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
private Job initializeWiki(String wikiId, XWikiContext xcontext) throws JobException
{
synchronized (this.initializedWikis) {
WikiInitializerJob wikiJob = this.initializedWikis.get(wikiId);
if (wikiJob == null) {
WikiInitializerRequest request = new WikiInitializerRequest(wikiId);
JobRequestContext.set(request, xcontext);
wikiJob = (WikiInitializerJob) getJobExecutor().execute(WikiInitializerJob.JOBTYPE, request);
this.initializedWikis.put(wikiId, wikiJob);
}
return wikiJob;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeWiki
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
|
initializeWiki
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Intent createManageBlockedNumbersIntent() {
return BlockedNumbersActivity.getIntentForStartingActivity();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createManageBlockedNumbersIntent
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
createManageBlockedNumbersIntent
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int close(int nativeHandle) throws RemoteException {
NfcPermissions.enforceUserPermissions(mContext);
TagEndpoint tag = null;
if (!isNfcEnabled()) {
return ErrorCodes.ERROR_NOT_INITIALIZED;
}
/* find the tag in the hmap */
tag = (TagEndpoint) findObject(nativeHandle);
if (tag != null) {
/* Remove the device from the hmap */
unregisterObject(nativeHandle);
tag.disconnect();
return ErrorCodes.SUCCESS;
}
/* Restart polling loop for notification */
applyRouting(true);
return ErrorCodes.ERROR_DISCONNECT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
close
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public com.xpn.xwiki.api.Object updateObjectFromRequest(String className, String prefix) throws XWikiException
{
com.xpn.xwiki.api.Object obj = new com.xpn.xwiki.api.Object(
getDoc().updateObjectFromRequest(className, prefix, getXWikiContext()), getXWikiContext());
updateAuthor();
return obj;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObjectFromRequest
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
updateObjectFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrateUserControlDisabledPackagesLocked() {
Binder.withCleanCallingIdentity(() -> {
List<UserInfo> users = mUserManager.getUsers();
for (UserInfo userInfo : users) {
ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(userInfo.id);
if (admin != null && admin.protectedPackages != null) {
EnforcingAdmin enforcingAdmin = EnforcingAdmin.createEnterpriseEnforcingAdmin(
admin.info.getComponent(),
admin.getUserHandle().getIdentifier(),
admin);
if (isDeviceOwner(admin)) {
mDevicePolicyEngine.setGlobalPolicy(
PolicyDefinition.USER_CONTROLLED_DISABLED_PACKAGES,
enforcingAdmin,
new StringSetPolicyValue(new HashSet<>(admin.protectedPackages)));
} else {
mDevicePolicyEngine.setLocalPolicy(
PolicyDefinition.USER_CONTROLLED_DISABLED_PACKAGES,
enforcingAdmin,
new StringSetPolicyValue(new HashSet<>(admin.protectedPackages)),
admin.getUserHandle().getIdentifier());
}
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrateUserControlDisabledPackagesLocked
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
|
migrateUserControlDisabledPackagesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepare(Template template, HttpServletRequest request) {
// Request
template.put("request", request);
// Portlet config
PortletConfig portletConfig = (PortletConfig)request.getAttribute(
JavaConstants.JAVAX_PORTLET_CONFIG);
if (portletConfig != null) {
template.put("portletConfig", portletConfig);
}
// Render request
final PortletRequest portletRequest =
(PortletRequest)request.getAttribute(
JavaConstants.JAVAX_PORTLET_REQUEST);
if (portletRequest != null) {
if (portletRequest instanceof RenderRequest) {
template.put("renderRequest", portletRequest);
}
}
// Render response
final PortletResponse portletResponse =
(PortletResponse)request.getAttribute(
JavaConstants.JAVAX_PORTLET_RESPONSE);
if (portletResponse != null) {
if (portletResponse instanceof RenderResponse) {
template.put("renderResponse", portletResponse);
}
}
// XML request
if ((portletRequest != null) && (portletResponse != null)) {
template.put(
"portletRequestModelFactory",
new PortletRequestModelFactory(
portletRequest, portletResponse));
// Deprecated
template.put(
"xmlRequest",
new Object() {
@Override
public String toString() {
PortletRequestModel portletRequestModel =
new PortletRequestModel(
portletRequest, portletResponse);
return portletRequestModel.toXML();
}
}
);
}
// Theme display
ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
WebKeys.THEME_DISPLAY);
if (themeDisplay != null) {
Layout layout = themeDisplay.getLayout();
List<Layout> layouts = themeDisplay.getLayouts();
template.put("themeDisplay", themeDisplay);
template.put("company", themeDisplay.getCompany());
template.put("user", themeDisplay.getUser());
template.put("realUser", themeDisplay.getRealUser());
template.put("layout", layout);
template.put("layouts", layouts);
template.put("plid", String.valueOf(themeDisplay.getPlid()));
template.put(
"layoutTypePortlet", themeDisplay.getLayoutTypePortlet());
template.put(
"scopeGroupId", new Long(themeDisplay.getScopeGroupId()));
template.put(
"permissionChecker", themeDisplay.getPermissionChecker());
template.put("locale", themeDisplay.getLocale());
template.put("timeZone", themeDisplay.getTimeZone());
template.put("colorScheme", themeDisplay.getColorScheme());
template.put("portletDisplay", themeDisplay.getPortletDisplay());
// Navigation items
if (layout != null) {
List<NavItem> navItems = NavItem.fromLayouts(
request, layouts, template);
template.put("navItems", navItems);
}
// Deprecated
template.put(
"portletGroupId", new Long(themeDisplay.getScopeGroupId()));
}
// Theme
Theme theme = (Theme)request.getAttribute(WebKeys.THEME);
if ((theme == null) && (themeDisplay != null)) {
theme = themeDisplay.getTheme();
}
if (theme != null) {
template.put("theme", theme);
}
// Tiles attributes
prepareTiles(template, request);
// Page title and subtitle
ListMergeable<String> pageTitleListMergeable =
(ListMergeable<String>)request.getAttribute(WebKeys.PAGE_TITLE);
if (pageTitleListMergeable != null) {
String pageTitle = pageTitleListMergeable.mergeToString(
StringPool.SPACE);
template.put("pageTitle", pageTitle);
}
ListMergeable<String> pageSubtitleListMergeable =
(ListMergeable<String>)request.getAttribute(WebKeys.PAGE_SUBTITLE);
if (pageSubtitleListMergeable != null) {
String pageSubtitle = pageSubtitleListMergeable.mergeToString(
StringPool.SPACE);
template.put("pageSubtitle", pageSubtitle);
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2014-2963
- Severity: MEDIUM
- CVSS Score: 4.3
Description: LPS-46156
Function: prepare
File: portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
Repository: samuelkong/liferay-portal
Fixed Code:
public void prepare(Template template, HttpServletRequest request) {
// Request
template.put("request", request);
// Portlet config
PortletConfig portletConfig = (PortletConfig)request.getAttribute(
JavaConstants.JAVAX_PORTLET_CONFIG);
if (portletConfig != null) {
template.put("portletConfig", portletConfig);
}
// Render request
final PortletRequest portletRequest =
(PortletRequest)request.getAttribute(
JavaConstants.JAVAX_PORTLET_REQUEST);
if (portletRequest != null) {
if (portletRequest instanceof RenderRequest) {
template.put("renderRequest", portletRequest);
}
}
// Render response
final PortletResponse portletResponse =
(PortletResponse)request.getAttribute(
JavaConstants.JAVAX_PORTLET_RESPONSE);
if (portletResponse != null) {
if (portletResponse instanceof RenderResponse) {
template.put("renderResponse", portletResponse);
}
}
// XML request
if ((portletRequest != null) && (portletResponse != null)) {
template.put(
"portletRequestModelFactory",
new PortletRequestModelFactory(
portletRequest, portletResponse));
// Deprecated
template.put(
"xmlRequest",
new Object() {
@Override
public String toString() {
PortletRequestModel portletRequestModel =
new PortletRequestModel(
portletRequest, portletResponse);
return portletRequestModel.toXML();
}
}
);
}
// Theme display
ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
WebKeys.THEME_DISPLAY);
if (themeDisplay != null) {
Layout layout = themeDisplay.getLayout();
List<Layout> layouts = themeDisplay.getLayouts();
template.put("themeDisplay", themeDisplay);
template.put("company", themeDisplay.getCompany());
template.put("user", themeDisplay.getUser());
template.put("realUser", themeDisplay.getRealUser());
template.put("layout", layout);
template.put("layouts", layouts);
template.put("plid", String.valueOf(themeDisplay.getPlid()));
template.put(
"layoutTypePortlet", themeDisplay.getLayoutTypePortlet());
template.put(
"scopeGroupId", new Long(themeDisplay.getScopeGroupId()));
template.put(
"permissionChecker", themeDisplay.getPermissionChecker());
template.put("locale", themeDisplay.getLocale());
template.put("timeZone", themeDisplay.getTimeZone());
template.put("colorScheme", themeDisplay.getColorScheme());
template.put("portletDisplay", themeDisplay.getPortletDisplay());
// Navigation items
if (layout != null) {
List<NavItem> navItems = NavItem.fromLayouts(
request, layouts, template);
template.put("navItems", navItems);
}
// Deprecated
template.put(
"portletGroupId", new Long(themeDisplay.getScopeGroupId()));
}
// Theme
Theme theme = (Theme)request.getAttribute(WebKeys.THEME);
if ((theme == null) && (themeDisplay != null)) {
theme = themeDisplay.getTheme();
}
if (theme != null) {
template.put("theme", theme);
}
// Tiles attributes
prepareTiles(template, request);
// Page title and subtitle
ListMergeable<String> pageTitleListMergeable =
(ListMergeable<String>)request.getAttribute(WebKeys.PAGE_TITLE);
if (pageTitleListMergeable != null) {
String pageTitle = pageTitleListMergeable.mergeToString(
StringPool.SPACE);
template.put("pageTitle", HtmlUtil.stripHtml(pageTitle));
}
ListMergeable<String> pageSubtitleListMergeable =
(ListMergeable<String>)request.getAttribute(WebKeys.PAGE_SUBTITLE);
if (pageSubtitleListMergeable != null) {
String pageSubtitle = pageSubtitleListMergeable.mergeToString(
StringPool.SPACE);
template.put("pageSubtitle", HtmlUtil.stripHtml(pageSubtitle));
}
}
|
[
"CWE-79"
] |
CVE-2014-2963
|
MEDIUM
| 4.3
|
samuelkong/liferay-portal
|
prepare
|
portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
|
5db1f7622e8e2c9a559ef0145a0f04c5854a1e8b
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public CmsResource importResource(
CmsObject cms,
CmsSecurityManager securityManager,
String resourcename,
CmsResource resource,
byte[] content,
List<CmsProperty> properties)
throws CmsException {
if (resourcename.toLowerCase().endsWith(".svg")) {
properties = tryAddImageSizeFromSvg(content, properties);
} else if (CmsImageLoader.isEnabled()) {
// siblings have null content in import
if (content != null) {
// get the downscaler to use
CmsImageScaler downScaler = getDownScaler(cms, resource.getRootPath());
// create a new image scale adjuster
CmsImageAdjuster adjuster = new CmsImageAdjuster(
content,
resource.getRootPath(),
properties,
downScaler);
// update the image scale adjuster - this will calculate the image dimensions and (optionally) adjust the size
adjuster.adjust();
// continue with the updated content and properties
content = adjuster.getContent();
properties = adjuster.getProperties();
}
}
return super.importResource(cms, securityManager, resourcename, resource, content, properties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: importResource
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
|
importResource
|
src/org/opencms/file/types/CmsResourceTypeImage.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void validateValue(ValueValidator<V> validator, K name, V value) {
validator.validate(value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateValue
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
|
validateValue
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public ProjectNamingStrategy getProjectNamingStrategy() {
return projectNamingStrategy == null ? ProjectNamingStrategy.DEFAULT_NAMING_STRATEGY : projectNamingStrategy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProjectNamingStrategy
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
|
getProjectNamingStrategy
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDescription(CellReference cell);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
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
|
getDescription
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void registerConverter(SingleValueConverter converter) {
registerConverter(converter, PRIORITY_NORMAL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerConverter
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
|
registerConverter
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<IBaseResource> doHistoryInTransaction(int theFromIndex, int theToIndex) {
HistoryBuilder historyBuilder = myHistoryBuilderFactory.newHistoryBuilder(mySearchEntity.getResourceType(), mySearchEntity.getResourceId(), mySearchEntity.getLastUpdatedLow(), mySearchEntity.getLastUpdatedHigh());
RequestPartitionId partitionId = getRequestPartitionId();
List<ResourceHistoryTable> results = historyBuilder.fetchEntities(partitionId, theFromIndex, theToIndex);
List<IBaseResource> retVal = new ArrayList<>();
for (ResourceHistoryTable next : results) {
BaseHasResource resource;
resource = next;
IFhirResourceDao<?> dao = myDaoRegistry.getResourceDao(next.getResourceType());
retVal.add(dao.toResource(resource, true));
}
// Interceptor call: STORAGE_PREACCESS_RESOURCES
{
SimplePreResourceAccessDetails accessDetails = new SimplePreResourceAccessDetails(retVal);
HookParams params = new HookParams()
.add(IPreResourceAccessDetails.class, accessDetails)
.add(RequestDetails.class, myRequest)
.addIfMatchesType(ServletRequestDetails.class, myRequest);
JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, myRequest, Pointcut.STORAGE_PREACCESS_RESOURCES, params);
for (int i = retVal.size() - 1; i >= 0; i--) {
if (accessDetails.isDontReturnResourceAtIndex(i)) {
retVal.remove(i);
}
}
}
// Interceptor broadcast: STORAGE_PRESHOW_RESOURCES
{
SimplePreResourceShowDetails showDetails = new SimplePreResourceShowDetails(retVal);
HookParams params = new HookParams()
.add(IPreResourceShowDetails.class, showDetails)
.add(RequestDetails.class, myRequest)
.addIfMatchesType(ServletRequestDetails.class, myRequest);
JpaInterceptorBroadcaster.doCallHooks(myInterceptorBroadcaster, myRequest, Pointcut.STORAGE_PRESHOW_RESOURCES, params);
retVal = showDetails.toList();
}
return retVal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doHistoryInTransaction
File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
doHistoryInTransaction
|
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getContentInode() {
return contentInode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentInode
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
getContentInode
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepareForPossibleShutdown() {
if (mUsageStatsService != null) {
mUsageStatsService.prepareForPossibleShutdown();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareForPossibleShutdown
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
prepareForPossibleShutdown
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate() {
instance = this;
super.onCreate();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createChannel();
}
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID);
if( builder != null ) {
startForeground(1, builder.build());
}
//initMediaPlayer();
initMediaSession();
initNoisyReceiver();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onCreate
|
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public void grantImplicitAccess(int userId, Intent intent, int visibleUid, int recipientAppId) {
getPackageManagerInternal()
.grantImplicitAccess(userId, intent, recipientAppId, visibleUid, true /*direct*/);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantImplicitAccess
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
grantImplicitAccess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserAgent(){
return userAgent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAgent
File: samples/client/petstore/java/resteasy/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
|
getUserAgent
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int compare(SwitchPort d1, SwitchPort d2) {
DatapathId d1ClusterId = topologyService.getL2DomainId(d1.getSwitchDPID());
DatapathId d2ClusterId = topologyService.getL2DomainId(d2.getSwitchDPID());
return d1ClusterId.compareTo(d2ClusterId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compare
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
compare
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkIfViaSSO(Intent intent) {
Bundle extras = intent.getExtras();
if (extras == null) {
return false;
} else {
String authTokenType = extras.getString("authTokenType");
return "SSO".equals(authTokenType);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkIfViaSSO
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
checkIfViaSSO
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String pathToURLPath(String path) {
int len = CacheLRUWrapper.getInstance().getCacheDir().getFullPath().length();
int index = path.indexOf(File.separatorChar, len + 1);
return path.substring(index);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pathToURLPath
File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
pathToURLPath
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized int restoreAll(long token, IRestoreObserver observer) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"performRestore");
if (DEBUG) Slog.d(TAG, "restoreAll token=" + Long.toHexString(token)
+ " observer=" + observer);
if (mEnded) {
throw new IllegalStateException("Restore session already ended");
}
if (mTimedOut) {
Slog.i(TAG, "Session already timed out");
return -1;
}
if (mRestoreTransport == null || mRestoreSets == null) {
Slog.e(TAG, "Ignoring restoreAll() with no restore set");
return -1;
}
if (mPackageName != null) {
Slog.e(TAG, "Ignoring restoreAll() on single-package session");
return -1;
}
String dirName;
try {
dirName = mRestoreTransport.transportDirName();
} catch (RemoteException e) {
// Transport went AWOL; fail.
Slog.e(TAG, "Unable to contact transport for restore");
return -1;
}
synchronized (mQueueLock) {
for (int i = 0; i < mRestoreSets.length; i++) {
if (token == mRestoreSets[i].token) {
// Real work, so stop the session timeout until we finalize the restore
mBackupHandler.removeMessages(MSG_RESTORE_TIMEOUT);
long oldId = Binder.clearCallingIdentity();
mWakelock.acquire();
if (MORE_DEBUG) {
Slog.d(TAG, "restoreAll() kicking off");
}
Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
msg.obj = new RestoreParams(mRestoreTransport, dirName,
observer, token);
mBackupHandler.sendMessage(msg);
Binder.restoreCallingIdentity(oldId);
return 0;
}
}
}
Slog.w(TAG, "Restore token " + Long.toHexString(token) + " not found");
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restoreAll
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
|
restoreAll
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@SysUISingleton
@Provides
static GroupExpansionManager provideGroupExpansionManager(
NotifPipelineFlags notifPipelineFlags,
Lazy<GroupMembershipManager> groupMembershipManager,
Lazy<NotificationGroupManagerLegacy> groupManagerLegacy) {
return notifPipelineFlags.isNewPipelineEnabled()
? new GroupExpansionManagerImpl(groupMembershipManager.get())
: groupManagerLegacy.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: provideGroupExpansionManager
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
provideGroupExpansionManager
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void userInputRequried(PendingIntent pi, Conversation object) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userInputRequried
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
userInputRequried
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDescription() {
return description + " (*." + format + ")";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
getDescription
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
private RenderingContext getRenderingContext()
{
if (this.renderingContext == null) {
this.renderingContext = Utils.getComponent(RenderingContext.class);
}
return this.renderingContext;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderingContext
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
|
getRenderingContext
|
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 static OnmsUserList filterUserPasswords(final SecurityContext securityContext, final OnmsUserList users) {
Collections.sort(users.getUsers(), USER_COMPARATOR);
for (final OnmsUser user : users) {
filterUserPassword(securityContext, user);
}
return users;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterUserPasswords
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
|
filterUserPasswords
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
|
34ab169a74b2bc489ab06d0dbf33fee1ed94c93c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void checkAndFillCacheWriterConfigXml(XmlGenerator gen, String cacheWriter) {
if (isNullOrEmpty(cacheWriter)) {
return;
}
gen.node("cache-writer", null, "class-name", cacheWriter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAndFillCacheWriterConfigXml
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
checkAndFillCacheWriterConfigXml
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Set<String> parseListAuthorizations(Element securityTag) {
Set<String> authorizations = new TreeSet<String>();
NodeList lisOfAuth = securityTag.getElementsByTagName(SECURITY_ROLE_TAG);
for (int k = 0; k < lisOfAuth.getLength(); k++) {
Element role = (Element) lisOfAuth.item(k);
authorizations.add(unEscapeXML(
role.getAttributes()
.getNamedItem(SECURITY_ROLE_ATTNAME)
.getNodeValue()));
}
return authorizations;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseListAuthorizations
File: ff4j-core/src/main/java/org/ff4j/conf/XmlParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseListAuthorizations
|
ff4j-core/src/main/java/org/ff4j/conf/XmlParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isValidCompressedBuffer(ByteBuffer compressed)
throws IOException
{
return impl.isValidCompressedBuffer(compressed, compressed.position(),
compressed.remaining());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidCompressedBuffer
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
isValidCompressedBuffer
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initPowerManagement() {
mActivityTaskManager.onInitPowerManagement();
mBatteryStatsService.initPowerManagement();
mLocalPowerManager = LocalServices.getService(PowerManagerInternal.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initPowerManagement
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
initPowerManagement
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getRevokedByInUse() {
return revokedByInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRevokedByInUse
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getRevokedByInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getCallState() {
synchronized (mLock) {
return mCallsManager.getCallState();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCallState
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
getCallState
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isCurrentProfile(int userId) {
synchronized (mCurrentProfiles) {
return userId == UserHandle.USER_ALL || mCurrentProfiles.get(userId) != null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCurrentProfile
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
|
isCurrentProfile
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAssignedLabel(Label l) throws IOException {
if(l==null) {
canRoam = true;
assignedNode = null;
} else {
canRoam = false;
if(l== Jenkins.getInstance().getSelfLabel()) assignedNode = null;
else assignedNode = l.getExpression();
}
save();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAssignedLabel
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
|
setAssignedLabel
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getServerVersion() {
return serverVersion;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerVersion
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
getServerVersion
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getLockIdFromLockTokenHeader(
RequestContext requestContext
) {
HttpServletRequest req = requestContext.getHttpServletRequest();
String id = req.getHeader("Lock-Token");
if (id != null) {
id = id.substring(id.indexOf(":") + 1, id.indexOf(">"));
}
return id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLockIdFromLockTokenHeader
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
getLockIdFromLockTokenHeader
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void validate(final String path, final File outputDirectory) {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
validate
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setAssistiveCaption(String caption) {
if (Objects.equals(caption, getAssistiveCaption())) {
return this;
}
getState().assistiveCaption = caption;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAssistiveCaption
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
|
setAssistiveCaption
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String encodeURL(String arg0) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodeURL
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
encodeURL
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private ModelAndView renameGroup(HttpServletRequest request, HttpServletResponse response) throws Exception {
String oldName = request.getParameter("groupName");
String newName = request.getParameter("newName");
if (StringUtils.hasText(oldName) && StringUtils.hasText(newName)) {
m_groupRepository.renameGroup(oldName, newName);
}
return listGroups(request, response);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2021-25933
- Severity: LOW
- CVSS Score: 3.5
Description: NMS-13125: user ID and group ID must not contain any HTML markup
Function: renameGroup
File: opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
Repository: OpenNMS/opennms
Fixed Code:
private ModelAndView renameGroup(HttpServletRequest request, HttpServletResponse response) throws Exception {
String oldName = request.getParameter("groupName");
String newName = request.getParameter("newName");
if (newName != null && newName.matches(".*[&<>\"`']+.*")) {
throw new ServletException("Group ID must not contain any HTML markup.");
}
if (StringUtils.hasText(oldName) && StringUtils.hasText(newName)) {
m_groupRepository.renameGroup(oldName, newName);
}
return listGroups(request, response);
}
|
[
"CWE-79"
] |
CVE-2021-25933
|
LOW
| 3.5
|
OpenNMS/opennms
|
renameGroup
|
opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
|
8a97e6869d6e49da18b208c837438ace80049c01
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setValidNotAfterInUse(boolean validNotAfterInUse) {
this.validNotAfterInUse = validNotAfterInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setValidNotAfterInUse
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setValidNotAfterInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private String _getContactInfo(final User user, final String command) {
if (user == null) return "";
for (final Contact contact : user.getContacts()) {
if (contact != null && contact.getType().equals(command)) {
return contact.getInfo().orElse("");
}
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _getContactInfo
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
_getContactInfo
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
private final void checkWritePermission(int userId) {
mContext.enforceCallingOrSelfPermission(PERMISSION, "LockSettingsWrite");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkWritePermission
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
|
checkWritePermission
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
public Duration getMaxInactivityInterval() {
return maxInactivityInterval;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxInactivityInterval
File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2021-29481
|
MEDIUM
| 5
|
ratpack
|
getMaxInactivityInterval
|
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
|
60302fae7ef26897b9a0ec0def6281a9425344cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getRecentRevisions() throws XWikiException
{
return this.doc.getRecentRevisions(5, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRecentRevisions
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getRecentRevisions
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized void updateRow() throws SQLException {
checkUpdateable();
if (onInsertRow) {
throw new PSQLException(GT.tr("Cannot call updateRow() when on the insert row."),
PSQLState.INVALID_CURSOR_STATE);
}
List<Tuple> rows = castNonNull(this.rows, "rows");
if (isBeforeFirst() || isAfterLast() || rows.isEmpty()) {
throw new PSQLException(
GT.tr(
"Cannot update the ResultSet because it is either before the start or after the end of the results."),
PSQLState.INVALID_CURSOR_STATE);
}
if (!doingUpdates) {
return; // No work pending.
}
StringBuilder updateSQL = new StringBuilder("UPDATE " + onlyTable + tableName + " SET ");
HashMap<String, Object> updateValues = castNonNull(this.updateValues);
int numColumns = updateValues.size();
Iterator<String> columns = updateValues.keySet().iterator();
for (int i = 0; columns.hasNext(); i++) {
String column = columns.next();
Utils.escapeIdentifier(updateSQL, column);
updateSQL.append(" = ?");
if (i < numColumns - 1) {
updateSQL.append(", ");
}
}
updateSQL.append(" WHERE ");
List<PrimaryKey> primaryKeys = castNonNull(this.primaryKeys, "primaryKeys");
int numKeys = primaryKeys.size();
for (int i = 0; i < numKeys; i++) {
PrimaryKey primaryKey = primaryKeys.get(i);
Utils.escapeIdentifier(updateSQL, primaryKey.name);
updateSQL.append(" = ?");
if (i < numKeys - 1) {
updateSQL.append(" and ");
}
}
String sqlText = updateSQL.toString();
if (connection.getLogger().isLoggable(Level.FINE)) {
connection.getLogger().log(Level.FINE, "updating {0}", sqlText);
}
PreparedStatement updateStatement = null;
try {
updateStatement = connection.prepareStatement(sqlText);
int i = 0;
Iterator<Object> iterator = updateValues.values().iterator();
for (; iterator.hasNext(); i++) {
Object o = iterator.next();
updateStatement.setObject(i + 1, o);
}
for (int j = 0; j < numKeys; j++, i++) {
updateStatement.setObject(i + 1, primaryKeys.get(j).getValue());
}
updateStatement.executeUpdate();
} finally {
JdbcBlackHole.close(updateStatement);
}
Tuple rowBuffer = castNonNull(this.rowBuffer, "rowBuffer");
updateRowBuffer(null, rowBuffer, updateValues);
connection.getLogger().log(Level.FINE, "copying data");
thisRow = rowBuffer.readOnlyCopy();
rows.set(currentRow, rowBuffer);
connection.getLogger().log(Level.FINE, "done updates");
updateValues.clear();
doingUpdates = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateRow
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
|
updateRow
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public RemoteCache<K, V> getHotRodCache() {
return hotrodCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHotRodCache
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
|
getHotRodCache
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <T> T getAttachment(AttachmentKey<T> key) {
if (key == null) {
throw UndertowMessages.MESSAGES.argumentCannotBeNull("key");
}
return (T) attachments.get(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachment
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getAttachment
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
int binderGetCallingUid() {
return Binder.getCallingUid();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: binderGetCallingUid
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
|
binderGetCallingUid
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public @SemanticAction int getSemanticAction() {
return mSemanticAction;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSemanticAction
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getSemanticAction
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void checkResult(WxPayService wxPayService, String signType, boolean checkSuccess) throws WxPayException {
//校验返回结果签名
Map<String, String> map = toMap();
if (getSign() != null && !SignUtils.checkSign(map, signType, wxPayService.getConfig().getMchKey())) {
this.getLogger().debug("校验结果签名失败,参数:{}", map);
throw new WxPayException("参数格式校验错误!");
}
//校验结果是否成功
if (checkSuccess) {
List<String> successStrings = Lists.newArrayList(WxPayConstants.ResultCode.SUCCESS, "");
if (!successStrings.contains(StringUtils.trimToEmpty(getReturnCode()).toUpperCase())
|| !successStrings.contains(StringUtils.trimToEmpty(getResultCode()).toUpperCase())) {
StringBuilder errorMsg = new StringBuilder();
if (getReturnCode() != null) {
errorMsg.append("返回代码:").append(getReturnCode());
}
if (getReturnMsg() != null) {
errorMsg.append(",返回信息:").append(getReturnMsg());
}
if (getResultCode() != null) {
errorMsg.append(",结果代码:").append(getResultCode());
}
if (getErrCode() != null) {
errorMsg.append(",错误代码:").append(getErrCode());
}
if (getErrCodeDes() != null) {
errorMsg.append(",错误详情:").append(getErrCodeDes());
}
this.getLogger().error("\n结果业务代码异常,返回结果:{},\n{}", map, errorMsg.toString());
throw WxPayException.from(this);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkResult
File: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/BaseWxPayResult.java
Repository: Wechat-Group/WxJava
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20318
|
HIGH
| 7.5
|
Wechat-Group/WxJava
|
checkResult
|
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/BaseWxPayResult.java
|
6272639f02e397fed40828a2d0da66c30264bc0e
| 0
|
Analyze the following code function for security vulnerabilities
|
public MessagingStyle setConversationTitle(@Nullable CharSequence conversationTitle) {
mConversationTitle = conversationTitle;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConversationTitle
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setConversationTitle
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Long getCreateUserId() {
return createUserId;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-7171
- Severity: LOW
- CVSS Score: 3.3
Description: fix(novel-admin): 友情链接URL格式校验
Function: getCreateUserId
File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
Repository: 201206030/novel-plus
Fixed Code:
public Long getCreateUserId() {
return createUserId;
}
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
getCreateUserId
|
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 1
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public boolean getCrossProfileCallerIdDisabled(UserHandle userHandle) {
if (mService != null) {
try {
return mService.getCrossProfileCallerIdDisabledForUser(userHandle.getIdentifier());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfileCallerIdDisabled
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getCrossProfileCallerIdDisabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean requestIcon(String bssid, String fileName) {
return mWifiNative.requestIcon(mInterfaceName, bssid, fileName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestIcon
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
requestIcon
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private void done(final RequestImpl req, final ResponseImpl rsp, final Throwable x,
final boolean close) {
// mark request/response as done.
req.done();
if (close) {
rsp.done(Optional.ofNullable(x));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: done
File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
done
|
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String parseVia(String viaId, String refField) {
final ID anyId = ID.isId(viaId) ? ID.valueOf(viaId) : null;
if (anyId == null) return null;
JSONObject filterExp = null;
// via Charts
if (anyId.getEntityCode() == EntityHelper.ChartConfig) {
ConfigBean chart = ChartManager.instance.getChart(anyId);
if (chart != null) filterExp = ((JSONObject) chart.getJSON("config")).getJSONObject("filter");
}
// via AdvFilter
else if (anyId.getEntityCode() == EntityHelper.FilterConfig) {
ConfigBean filter = AdvFilterManager.instance.getAdvFilter(anyId);
if (filter != null) filterExp = (JSONObject) filter.getJSON("filter");
}
// via OTHERS
else if (refField != null) {
// format: Entity.Field
String[] entityAndField = refField.split("\\.");
Assert.isTrue(entityAndField.length == 2, "Bad `via` filter defined");
Field field = MetadataHelper.getField(entityAndField[0], entityAndField[1]);
String useOp = field.getType() == FieldType.REFERENCE ? ParseHelper.EQ : ParseHelper.IN;
JSONObject item = JSONUtils.toJSONObject(
new String[] { "field", "op", "value" },
new Object[] { entityAndField[1], useOp, anyId });
filterExp = JSONUtils.toJSONObject("entity", entityAndField[0]);
filterExp.put("items", Collections.singletonList(item));
}
return filterExp == null ? null : new AdvFilterParser(filterExp).toSqlWhere();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseVia
File: src/main/java/com/rebuild/core/support/general/ProtocolFilterParser.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
parseVia
|
src/main/java/com/rebuild/core/support/general/ProtocolFilterParser.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void populateUrlAttributeMap(final Map<String, String> urlParameters) {
// nothing to do
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateUrlAttributeMap
File: cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java
Repository: apereo/java-cas-client
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2014-4172
|
HIGH
| 7.5
|
apereo/java-cas-client
|
populateUrlAttributeMap
|
cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java
|
ae37092100c8eaec610dab6d83e5e05a8ee58814
| 0
|
Analyze the following code function for security vulnerabilities
|
private MacAddress setRandomizedMacToPersistentMac(WifiConfiguration config) {
MacAddress persistentMac = getPersistentMacAddress(config);
if (persistentMac == null || persistentMac.equals(config.getRandomizedMacAddress())) {
return persistentMac;
}
WifiConfiguration internalConfig = getInternalConfiguredNetwork(config.networkId);
setRandomizedMacAddress(internalConfig, persistentMac);
return persistentMac;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRandomizedMacToPersistentMac
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
setRandomizedMacToPersistentMac
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getFrontActivityScreenCompatMode() {
enforceNotIsolatedCaller("getFrontActivityScreenCompatMode");
synchronized (this) {
return mCompatModePackages.getFrontActivityScreenCompatModeLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFrontActivityScreenCompatMode
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
|
getFrontActivityScreenCompatMode
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getConfigPage() {
return getViewPage(clazz, getPossibleViewNames("config"), "config.jelly");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigPage
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getConfigPage
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEmail(final String userID) throws IOException {
return getContactInfo(userID, ContactType.email.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEmail
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getEmail
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected SearchHits indexSearch(String query, int limit, int offset, String sortBy) {
String qq=findAndReplaceQueryDates(translateQuery(query, sortBy).getQuery());
// we check the query to figure out wich indexes to hit
String indexToHit;
IndiciesInfo info;
try {
info=APILocator.getIndiciesAPI().loadIndicies();
}
catch(DotDataException ee) {
Logger.fatal(this, "Can't get indicies information",ee);
return null;
}
if(query.contains("+live:true") && !query.contains("+deleted:true"))
indexToHit=info.live;
else
indexToHit=info.working;
Client client=new ESClient().getClient();
SearchResponse resp = null;
try {
SearchRequestBuilder srb = createRequest(client, qq, sortBy);
srb.setIndices(indexToHit);
srb.addFields("inode","identifier");
if(limit>0)
srb.setSize(limit);
if(offset>0)
srb.setFrom(offset);
if(UtilMethods.isSet(sortBy) ) {
sortBy = sortBy.toLowerCase();
if(sortBy.endsWith("-order")) {
// related content ordering
int ind0=sortBy.indexOf('-'); // relationships tipicaly have a format stname1-stname2
int ind1=ind0>0 ? sortBy.indexOf('-',ind0+1) : -1;
if(ind1>0) {
String relName=sortBy.substring(0, ind1);
if((ind1+1)<sortBy.length()) {
String identifier=sortBy.substring(ind1+1, sortBy.length()-6);
if(UtilMethods.isSet(identifier)) {
srb.addSort(SortBuilders.scriptSort("related", "number")
.lang("native")
.param("relName", relName)
.param("identifier", identifier)
.order(SortOrder.ASC));
}
}
}
}
else if(sortBy.startsWith("score")){
String[] test = sortBy.split("\\s+");
String defualtSecondarySort = "moddate";
SortOrder defaultSecondardOrder = SortOrder.DESC;
if(test.length>2){
if(test[2].equalsIgnoreCase("desc"))
defaultSecondardOrder = SortOrder.DESC;
else
defaultSecondardOrder = SortOrder.ASC;
}
if(test.length>1){
defualtSecondarySort= test[1];
}
srb.addSort("_score", SortOrder.DESC);
srb.addSort(defualtSecondarySort, defaultSecondardOrder);
}
else if(!sortBy.startsWith("undefined") && !sortBy.startsWith("undefined_dotraw") && !sortBy.equals("random")) {
String[] sortbyArr=sortBy.split(",");
for (String sort : sortbyArr) {
String[] x=sort.trim().split(" ");
srb.addSort(SortBuilders.fieldSort(x[0].toLowerCase() + "_dotraw").order(x.length>1 && x[1].equalsIgnoreCase("desc") ?
SortOrder.DESC : SortOrder.ASC));
}
}
}
try{
resp = srb.execute().actionGet();
}catch (SearchPhaseExecutionException e) {
if(e.getMessage().contains("dotraw] in order to sort on")){
return new InternalSearchHits(InternalSearchHits.EMPTY,0,0);
}else{
throw e;
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return resp.getHits();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: indexSearch
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
indexSearch
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference,
String wikilocale, XWikiContext context) throws XWikiException
{
return copyDocument(sourceDocumentReference, targetDocumentReference, wikilocale, true, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyDocument
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
|
copyDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static JSONObject toJSONObject(String string) throws JSONException {
return toJSONObject(string, XMLParserConfiguration.ORIGINAL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJSONObject
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
|
toJSONObject
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.