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
|
@NonNull
public static List<Message> getMessagesFromBundleArray(@Nullable Parcelable[] bundles) {
if (bundles == null) {
return new ArrayList<>();
}
List<Message> messages = new ArrayList<>(bundles.length);
for (int i = 0; i < bundles.length; i++) {
if (bundles[i] instanceof Bundle) {
Message message = getMessageFromBundle((Bundle)bundles[i]);
if (message != null) {
messages.add(message);
}
}
}
return messages;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessagesFromBundleArray
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getMessagesFromBundleArray
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeSession(WrappedSession wrappedSession) {
assert VaadinSession.hasLock(this, wrappedSession);
removeFromHttpSession(wrappedSession);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSession
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
removeSession
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputStream getInputStream() throws IOException {
return mInputStream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputStream
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-9908
|
LOW
| 3.3
|
Genymobile/f2ut_platform_frameworks_base
|
getInputStream
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final DeserializerFactory withValueInstantiators(ValueInstantiators instantiators) {
return withConfig(_factoryConfig.withValueInstantiators(instantiators));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withValueInstantiators
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
withValueInstantiators
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getReadTimeout() {
return readTimeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReadTimeout
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
|
getReadTimeout
|
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 List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, int nb, int start,
List<?> parameterValues, XWikiContext context) throws XWikiException
{
return searchDocuments(wheresql, distinctbylanguage, false, nb, start, parameterValues, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchDocuments
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
searchDocuments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId) {
enforceNotIsolatedCaller("startActivityAndWait");
userId = mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
userId, false, ALLOW_FULL_ONLY, "startActivityAndWait", null);
WaitResult res = new WaitResult();
// TODO: Switch to user app stacks here.
mActivityStartController.obtainStarter(intent, "startActivityAndWait")
.setCaller(caller)
.setCallingPackage(callingPackage)
.setResolvedType(resolvedType)
.setResultTo(resultTo)
.setResultWho(resultWho)
.setRequestCode(requestCode)
.setStartFlags(startFlags)
.setActivityOptions(bOptions)
.setMayWait(userId)
.setProfilerInfo(profilerInfo)
.setWaitResult(res)
.execute();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAndWait
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
|
startActivityAndWait
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Conversation getConversation(Activity activity) {
return getConversation(activity, R.id.secondary_fragment);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConversation
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
getConversation
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
private RequestPartitionId getRequestPartitionId() {
if (myRequestPartitionId == null) {
if (mySearchEntity.getResourceId() != null) {
// If we have an ID, we've already checked the partition and made sure it's appropriate
myRequestPartitionId = RequestPartitionId.allPartitions();
} else {
myRequestPartitionId = myRequestPartitionHelperSvc.determineReadPartitionForRequest(myRequest, mySearchEntity.getResourceType());
}
}
return myRequestPartitionId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestPartitionId
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
|
getRequestPartitionId
|
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void setSmoothParams() throws Exception {
assertPlotParam("smooth", "unique");
assertPlotParam("smooth", "frequency");
assertPlotParam("smooth", "fnormal");
assertPlotParam("smooth", "cumulative");
assertPlotParam("smooth", "cnormal");
assertPlotParam("smooth", "bins");
assertPlotParam("smooth", "csplines");
assertPlotParam("smooth", "acsplines");
assertPlotParam("smooth", "mcsplines");
assertPlotParam("smooth", "bezier");
assertPlotParam("smooth", "sbezier");
assertPlotParam("smooth", "unwrap");
assertPlotParam("smooth", "zsort");
assertInvalidPlotParam("smooth", "[33:system(%20");
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2023-36812
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Improved fix for #2261.
Regular expressions wouldn't catch the newlines or possibly other
control characters. Now we'll use the TAG validation code to make
sure the inputs are only plain ASCII printables first.
Fixes CVE-2018-12972, CVE-2020-35476
Function: setSmoothParams
File: test/tsd/TestGraphHandler.java
Repository: OpenTSDB/opentsdb
Fixed Code:
@Test
public void setSmoothParams() throws Exception {
assertPlotParam("smooth", "unique");
assertPlotParam("smooth", "frequency");
assertPlotParam("smooth", "fnormal");
assertPlotParam("smooth", "cumulative");
assertPlotParam("smooth", "cnormal");
assertPlotParam("smooth", "bins");
assertPlotParam("smooth", "csplines");
assertPlotParam("smooth", "acsplines");
assertPlotParam("smooth", "mcsplines");
assertPlotParam("smooth", "bezier");
assertPlotParam("smooth", "sbezier");
assertPlotParam("smooth", "unwrap");
assertPlotParam("smooth", "zsort");
assertInvalidPlotParam("smooth", "bezier%20system(%20");
assertInvalidPlotParam("smooth", "fnormal%0asystem(%20");
}
|
[
"CWE-74"
] |
CVE-2023-36812
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
setSmoothParams
|
test/tsd/TestGraphHandler.java
|
07c4641471c6f5c2ab5aab615969e97211eb50d9
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isMapLikeType() { return false; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMapLikeType
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
isMapLikeType
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSystemProcess() {
try {
ServiceManager.addService(Context.ACTIVITY_SERVICE, this, true);
ServiceManager.addService(ProcessStats.SERVICE_NAME, mProcessStats);
ServiceManager.addService("meminfo", new MemBinder(this));
ServiceManager.addService("gfxinfo", new GraphicsBinder(this));
ServiceManager.addService("dbinfo", new DbBinder(this));
if (MONITOR_CPU_USAGE) {
ServiceManager.addService("cpuinfo", new CpuBinder(this));
}
ServiceManager.addService("permission", new PermissionController(this));
ServiceManager.addService("processinfo", new ProcessInfoService(this));
ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(
"android", STOCK_PM_FLAGS);
mSystemThread.installSystemApplicationInfo(info, getClass().getClassLoader());
synchronized (this) {
ProcessRecord app = newProcessRecordLocked(info, info.processName, false, 0);
app.persistent = true;
app.pid = MY_PID;
app.maxAdj = ProcessList.SYSTEM_ADJ;
app.makeActive(mSystemThread.getApplicationThread(), mProcessStats);
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.put(app.pid, app);
}
updateLruProcessLocked(app, false, null);
updateOomAdjLocked();
}
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException(
"Unable to find android system package", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemProcess
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
|
setSystemProcess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String serialize(Node node, boolean withXmlDeclaration)
{
if (node == null) {
return "";
}
try {
LSOutput output = LS_IMPL.createLSOutput();
StringWriter result = new StringWriter();
output.setCharacterStream(result);
LSSerializer serializer = LS_IMPL.createLSSerializer();
serializer.getDomConfig().setParameter("xml-declaration", withXmlDeclaration);
serializer.setNewLine("\n");
String encoding = "UTF-8";
if (node instanceof Document) {
encoding = ((Document) node).getXmlEncoding();
} else if (node.getOwnerDocument() != null) {
encoding = node.getOwnerDocument().getXmlEncoding();
}
output.setEncoding(encoding);
serializer.write(node, output);
return result.toString();
} catch (Exception ex) {
LOGGER.warn("Failed to serialize node to XML String: [{}]", ex.getMessage());
return "";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serialize
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java
Repository: xwiki/xwiki-commons
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-24898
|
MEDIUM
| 4
|
xwiki/xwiki-commons
|
serialize
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java
|
947e8921ebd95462d5a7928f397dd1b64f77c7d5
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void eventJournalXmlGenerator(XmlGenerator gen, Config config) {
Collection<EventJournalConfig> mapJournalConfigs = config.getMapEventJournalConfigs().values();
Collection<EventJournalConfig> cacheJournalConfigs = config.getCacheEventJournalConfigs().values();
for (EventJournalConfig c : mapJournalConfigs) {
gen.open("event-journal", "enabled", c.isEnabled())
.node("mapName", c.getMapName())
.node("capacity", c.getCapacity())
.node("time-to-live-seconds", c.getTimeToLiveSeconds())
.close();
}
for (EventJournalConfig c : cacheJournalConfigs) {
gen.open("event-journal", "enabled", c.isEnabled())
.node("cacheName", c.getCacheName())
.node("capacity", c.getCapacity())
.node("time-to-live-seconds", c.getTimeToLiveSeconds())
.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: eventJournalXmlGenerator
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
|
eventJournalXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setWindowWallpaperPositionLocked(WindowState window, float x, float y,
float xStep, float yStep) {
if (window.mWallpaperX != x || window.mWallpaperY != y) {
window.mWallpaperX = x;
window.mWallpaperY = y;
window.mWallpaperXStep = xStep;
window.mWallpaperYStep = yStep;
updateWallpaperOffsetLocked(window, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWindowWallpaperPositionLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
setWindowWallpaperPositionLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public View getStaplerFallback() {
return getPrimaryView();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStaplerFallback
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
|
getStaplerFallback
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@ApiOperation(value = "删除", notes = "删除")
@PostMapping("/remove")
@ResponseBody
@RequiresPermissions("novel:friendLink:remove")
public R remove(Integer id) {
if (friendLinkService.remove(id) > 0) {
redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok();
}
return R.error();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: remove
File: novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java
Repository: 201206030/novel-plus
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
remove
|
novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onResume() {
super.onResume();
mDevelopmentSettingsListener = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
updateTilesList();
}
};
LocalBroadcastManager.getInstance(this).registerReceiver(mDevelopmentSettingsListener,
new IntentFilter(DevelopmentSettingsEnabler.DEVELOPMENT_SETTINGS_CHANGED_ACTION));
registerReceiver(mBatteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
updateTilesList();
updateDeviceIndex();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResume
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
onResume
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateBigDecimal(
String columnName, @Nullable BigDecimal x) throws SQLException {
updateBigDecimal(findColumn(columnName), x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBigDecimal
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
|
updateBigDecimal
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearRelaunching() {
if (mPendingRelaunchCount == 0) {
return;
}
mPendingRelaunchCount = 0;
mRelaunchStartTime = 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearRelaunching
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
clearRelaunching
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean allowAutojoin(int networkId, boolean choice) {
if (mVerboseLoggingEnabled) {
Log.v(TAG, "Setting allowAutojoin to " + choice + " for netId " + networkId);
}
WifiConfiguration config = getInternalConfiguredNetwork(networkId);
if (config == null) {
Log.e(TAG, "allowAutojoin: Supplied networkId " + networkId
+ " has no matching config");
return false;
}
config.allowAutojoin = choice;
if (!choice) {
removeConnectChoiceFromAllNetworks(config.getProfileKey());
clearConnectChoiceInternal(config);
}
sendConfiguredNetworkChangedBroadcast(WifiManager.CHANGE_REASON_CONFIG_CHANGE);
if (!config.ephemeral) {
saveToStore(true);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowAutojoin
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
|
allowAutojoin
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setInitialWorkerPort(int initialPort) {
prop.setProperty(TS_INITIAL_WORKER_PORT, String.valueOf(initialPort));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInitialWorkerPort
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
setInitialWorkerPort
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void normalize() {
for (DomNode child = getFirstChild(); child != null; child = child.getNextSibling()) {
if (child instanceof DomText) {
final boolean removeChildTextNodes = hasFeature(DOM_NORMALIZE_REMOVE_CHILDREN);
final StringBuilder dataBuilder = new StringBuilder();
DomNode toRemove = child;
DomText firstText = null;
//IE removes all child text nodes, but FF preserves the first
while (toRemove instanceof DomText && !(toRemove instanceof DomCDataSection)) {
final DomNode nextChild = toRemove.getNextSibling();
dataBuilder.append(toRemove.getTextContent());
if (removeChildTextNodes || firstText != null) {
toRemove.remove();
}
if (firstText == null) {
firstText = (DomText) toRemove;
}
toRemove = nextChild;
}
if (firstText != null) {
if (removeChildTextNodes) {
final DomText newText = new DomText(getPage(), dataBuilder.toString());
insertBefore(newText, toRemove);
}
else {
firstText.setData(dataBuilder.toString());
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalize
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
normalize
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean validate() {
// Optional: PerProviderSubscription/<X+>/SubscriptionUpdate
if (mSubscriptionUpdate != null && !mSubscriptionUpdate.validate()) {
return false;
}
return validateForCommonR1andR2();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
validate
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onTouchEvent(MotionEvent event) {
if (!mFocused) {
mGestureDetector.onTouchEvent(event);
return true;
}
Tab currentTab = mUrlBarDelegate.getCurrentTab();
if (event.getAction() == MotionEvent.ACTION_DOWN && currentTab != null) {
// Make sure to hide the current ContentView ActionBar.
ContentViewCore viewCore = currentTab.getContentViewCore();
if (viewCore != null) viewCore.hideSelectActionMode();
}
return super.onTouchEvent(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTouchEvent
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
onTouchEvent
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFlags(int flags) {
mFlags = flags;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFlags
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setFlags
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean handleL3MessagesWhenNotConnected(Message message) {
boolean handleStatus = HANDLED;
if (!mIpClientWithPreConnection) {
return NOT_HANDLED;
}
switch (message.what) {
case CMD_PRE_DHCP_ACTION:
handlePreDhcpSetup();
break;
case CMD_PRE_DHCP_ACTION_COMPLETE:
if (mIpClient != null) {
mIpClient.completedPreDhcpAction();
}
break;
case CMD_IPV4_PROVISIONING_FAILURE:
stopDhcpSetup();
deferMessage(message);
break;
case CMD_POST_DHCP_ACTION:
case CMD_IPV4_PROVISIONING_SUCCESS:
case CMD_IP_CONFIGURATION_SUCCESSFUL:
deferMessage(message);
break;
default:
return NOT_HANDLED;
}
return handleStatus;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleL3MessagesWhenNotConnected
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
|
handleL3MessagesWhenNotConnected
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("/help")
@Produces("text/markdown")
public InputStream getFileHelp(@QueryParam("f") String fileName, @Context SecurityContext securityContext) {
if (!securityContext.isUserInRole(Authentication.ROLE_FILESYSTEM_EDITOR)) {
throw new ForbiddenException("FILESYSTEM EDITOR role is required for retrieving help.");
}
ensureFileIsAllowed(fileName);
return this.getClass().getResourceAsStream("/help/" + fileName + ".md");
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-40315
- Severity: HIGH
- CVSS Score: 8.0
Description: NMS-15702: Only members of ROLE_ADMIN can view/edit users.xml
Function: getFileHelp
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
Repository: OpenNMS/opennms
Fixed Code:
@GET
@Path("/help")
@Produces("text/markdown")
public InputStream getFileHelp(@QueryParam("f") String fileName, @Context SecurityContext securityContext) {
if (!securityContext.isUserInRole(Authentication.ROLE_FILESYSTEM_EDITOR)) {
throw new ForbiddenException("FILESYSTEM EDITOR role is required for retrieving help.");
}
ensureFileIsAllowed(fileName, securityContext);
return this.getClass().getResourceAsStream("/help/" + fileName + ".md");
}
|
[
"CWE-Other"
] |
CVE-2023-40315
|
HIGH
| 8
|
OpenNMS/opennms
|
getFileHelp
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
|
201301e067329ababa3c0671ded5c4c43347d4a8
| 1
|
Analyze the following code function for security vulnerabilities
|
private void copyUploadFile(BulkAssessmentDatas datas, File uploadedFile, List<BulkAssessmentRow> rows) throws IOException {
try(FileInputStream inStream = new FileInputStream(uploadedFile)) {
if(VFSManager.copyContent(inStream, targetArchive)) {
datas.setReturnFiles(targetArchive.getRelPath());
processReturnFiles(targetArchive, rows);
}
} catch(IOException e) {
logError("", e);
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyUploadFile
File: src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
copyUploadFile
|
src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<Account, Integer> getAccountsAndVisibilityForPackage(String packageName,
String accountType) {
int callingUid = Binder.getCallingUid();
int userId = UserHandle.getCallingUserId();
boolean isSystemUid = UserHandle.isSameApp(callingUid, Process.SYSTEM_UID);
List<String> managedTypes = getTypesForCaller(callingUid, userId, isSystemUid);
if ((accountType != null && !managedTypes.contains(accountType))
|| (accountType == null && !isSystemUid)) {
throw new SecurityException(
"getAccountsAndVisibilityForPackage() called from unauthorized uid "
+ callingUid + " with packageName=" + packageName);
}
if (accountType != null) {
managedTypes = new ArrayList<String>();
managedTypes.add(accountType);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
return getAccountsAndVisibilityForPackage(packageName, managedTypes, callingUid,
accounts);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccountsAndVisibilityForPackage
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
|
getAccountsAndVisibilityForPackage
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendSmAcknowledgementInternal() throws NotConnectedException, InterruptedException {
packetWriter.sendStreamElement(new AckAnswer(clientHandledStanzasCount));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSmAcknowledgementInternal
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
sendSmAcknowledgementInternal
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startInPlaceAnimationOnFrontMostApplication(ActivityOptions opts)
throws RemoteException {
if (opts.getAnimationType() != ActivityOptions.ANIM_CUSTOM_IN_PLACE ||
opts.getCustomInPlaceResId() == 0) {
throw new IllegalArgumentException("Expected in-place ActivityOption " +
"with valid animation");
}
mWindowManager.prepareAppTransition(AppTransition.TRANSIT_TASK_IN_PLACE, false);
mWindowManager.overridePendingAppTransitionInPlace(opts.getPackageName(),
opts.getCustomInPlaceResId());
mWindowManager.executeAppTransition();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startInPlaceAnimationOnFrontMostApplication
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
|
startInPlaceAnimationOnFrontMostApplication
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isChangeEnabled(long changeId, String packageName, int userId) {
return CompatChanges.isChangeEnabled(changeId, packageName, UserHandle.of(userId));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isChangeEnabled
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
|
isChangeEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void deploy() {
final DeploymentInfo deploymentInfo = originalDeployment.clone();
if (deploymentInfo.getServletStackTraces() == ServletStackTraces.ALL) {
UndertowServletLogger.REQUEST_LOGGER.servletStackTracesAll(deploymentInfo.getDeploymentName());
}
deploymentInfo.validate();
final DeploymentImpl deployment = new DeploymentImpl(this, deploymentInfo, servletContainer);
this.deployment = deployment;
final ServletContextImpl servletContext = new ServletContextImpl(servletContainer, deployment);
deployment.setServletContext(servletContext);
handleExtensions(deploymentInfo, servletContext);
final List<ThreadSetupHandler> setup = new ArrayList<>();
setup.add(ServletRequestContextThreadSetupAction.INSTANCE);
setup.add(new ContextClassLoaderSetupAction(deploymentInfo.getClassLoader()));
setup.addAll(deploymentInfo.getThreadSetupActions());
deployment.setThreadSetupActions(setup);
deployment.getServletPaths().setWelcomePages(deploymentInfo.getWelcomePages());
if (deploymentInfo.getDefaultEncoding() != null) {
deployment.setDefaultCharset(Charset.forName(deploymentInfo.getDefaultEncoding()));
}
if(deploymentInfo.getDefaultRequestEncoding() != null) {
deployment.setDefaultRequestCharset(Charset.forName(deploymentInfo.getDefaultRequestEncoding()));
} else if (deploymentInfo.getDefaultEncoding() != null) {
deployment.setDefaultRequestCharset(Charset.forName(deploymentInfo.getDefaultEncoding()));
}
if(deploymentInfo.getDefaultResponseEncoding() != null) {
deployment.setDefaultResponseCharset(Charset.forName(deploymentInfo.getDefaultResponseEncoding()));
} else if (deploymentInfo.getDefaultEncoding() != null) {
deployment.setDefaultResponseCharset(Charset.forName(deploymentInfo.getDefaultEncoding()));
}
handleDeploymentSessionConfig(deploymentInfo, servletContext);
deployment.setSessionManager(deploymentInfo.getSessionManagerFactory().createSessionManager(deployment));
deployment.getSessionManager().setDefaultSessionTimeout(deploymentInfo.getDefaultSessionTimeout());
try {
deployment.createThreadSetupAction(new ThreadSetupHandler.Action<Void, Object>() {
@Override
public Void call(HttpServerExchange exchange, Object ignore) throws Exception {
final ApplicationListeners listeners = createListeners();
listeners.start();
deployment.setApplicationListeners(listeners);
//now create the servlets and filters that we know about. We can still get more later
createServletsAndFilters(deployment, deploymentInfo);
//first initialize the temp dir
initializeTempDir(servletContext, deploymentInfo);
//then run the SCI's
for (final ServletContainerInitializerInfo sci : deploymentInfo.getServletContainerInitializers()) {
final InstanceHandle<? extends ServletContainerInitializer> instance = sci.getInstanceFactory().createInstance();
try {
instance.getInstance().onStartup(sci.getHandlesTypes(), servletContext);
} finally {
instance.release();
}
}
deployment.getSessionManager().registerSessionListener(new SessionListenerBridge(deployment, listeners, servletContext));
for(SessionListener listener : deploymentInfo.getSessionListeners()) {
deployment.getSessionManager().registerSessionListener(listener);
}
initializeErrorPages(deployment, deploymentInfo);
initializeMimeMappings(deployment, deploymentInfo);
listeners.contextInitialized();
//run
HttpHandler wrappedHandlers = ServletDispatchingHandler.INSTANCE;
wrappedHandlers = wrapHandlers(wrappedHandlers, deploymentInfo.getInnerHandlerChainWrappers());
if(!deploymentInfo.isSecurityDisabled()) {
HttpHandler securityHandler = setupSecurityHandlers(wrappedHandlers);
wrappedHandlers = new PredicateHandler(DispatcherTypePredicate.REQUEST, securityHandler, wrappedHandlers);
}
HttpHandler outerHandlers = wrapHandlers(wrappedHandlers, deploymentInfo.getOuterHandlerChainWrappers());
wrappedHandlers = new PredicateHandler(DispatcherTypePredicate.REQUEST, outerHandlers, wrappedHandlers);
wrappedHandlers = handleDevelopmentModePersistentSessions(wrappedHandlers, deploymentInfo, deployment.getSessionManager(), servletContext);
MetricsCollector metrics = deploymentInfo.getMetricsCollector();
if(metrics != null) {
wrappedHandlers = new MetricsChainHandler(wrappedHandlers, metrics, deployment);
}
if( deploymentInfo.getCrawlerSessionManagerConfig() != null ) {
wrappedHandlers = new CrawlerSessionManagerHandler(deploymentInfo.getCrawlerSessionManagerConfig(), wrappedHandlers);
}
final ServletInitialHandler servletInitialHandler = SecurityActions.createServletInitialHandler(deployment.getServletPaths(), wrappedHandlers, deployment, servletContext);
HttpHandler initialHandler = wrapHandlers(servletInitialHandler, deployment.getDeploymentInfo().getInitialHandlerChainWrappers());
initialHandler = new HttpContinueReadHandler(initialHandler);
if(deploymentInfo.getUrlEncoding() != null) {
initialHandler = Handlers.urlDecodingHandler(deploymentInfo.getUrlEncoding(), initialHandler);
}
deployment.setInitialHandler(initialHandler);
deployment.setServletHandler(servletInitialHandler);
deployment.getServletPaths().invalidate(); //make sure we have a fresh set of servlet paths
servletContext.initDone();
return null;
}
}).call(null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
//any problems with the paths won't get detected until the data is initialize
//so we force initialization here
deployment.getServletPaths().initData();
for(ServletContextListener listener : deploymentInfo.getDeploymentCompleteListeners()) {
listener.contextInitialized(new ServletContextEvent(servletContext));
}
state = State.DEPLOYED;
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2019-10184
- Severity: MEDIUM
- CVSS Score: 5.0
Description: [UNDERTOW-1578] 401 Unauthorized should be returned when requesting a protected directory without trailing slash
Function: deploy
File: servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
Repository: undertow-io/undertow
Fixed Code:
@Override
public void deploy() {
final DeploymentInfo deploymentInfo = originalDeployment.clone();
if (deploymentInfo.getServletStackTraces() == ServletStackTraces.ALL) {
UndertowServletLogger.REQUEST_LOGGER.servletStackTracesAll(deploymentInfo.getDeploymentName());
}
deploymentInfo.validate();
final DeploymentImpl deployment = new DeploymentImpl(this, deploymentInfo, servletContainer);
this.deployment = deployment;
final ServletContextImpl servletContext = new ServletContextImpl(servletContainer, deployment);
deployment.setServletContext(servletContext);
handleExtensions(deploymentInfo, servletContext);
final List<ThreadSetupHandler> setup = new ArrayList<>();
setup.add(ServletRequestContextThreadSetupAction.INSTANCE);
setup.add(new ContextClassLoaderSetupAction(deploymentInfo.getClassLoader()));
setup.addAll(deploymentInfo.getThreadSetupActions());
deployment.setThreadSetupActions(setup);
deployment.getServletPaths().setWelcomePages(deploymentInfo.getWelcomePages());
if (deploymentInfo.getDefaultEncoding() != null) {
deployment.setDefaultCharset(Charset.forName(deploymentInfo.getDefaultEncoding()));
}
if(deploymentInfo.getDefaultRequestEncoding() != null) {
deployment.setDefaultRequestCharset(Charset.forName(deploymentInfo.getDefaultRequestEncoding()));
} else if (deploymentInfo.getDefaultEncoding() != null) {
deployment.setDefaultRequestCharset(Charset.forName(deploymentInfo.getDefaultEncoding()));
}
if(deploymentInfo.getDefaultResponseEncoding() != null) {
deployment.setDefaultResponseCharset(Charset.forName(deploymentInfo.getDefaultResponseEncoding()));
} else if (deploymentInfo.getDefaultEncoding() != null) {
deployment.setDefaultResponseCharset(Charset.forName(deploymentInfo.getDefaultEncoding()));
}
handleDeploymentSessionConfig(deploymentInfo, servletContext);
deployment.setSessionManager(deploymentInfo.getSessionManagerFactory().createSessionManager(deployment));
deployment.getSessionManager().setDefaultSessionTimeout(deploymentInfo.getDefaultSessionTimeout());
try {
deployment.createThreadSetupAction(new ThreadSetupHandler.Action<Void, Object>() {
@Override
public Void call(HttpServerExchange exchange, Object ignore) throws Exception {
final ApplicationListeners listeners = createListeners();
listeners.start();
deployment.setApplicationListeners(listeners);
//now create the servlets and filters that we know about. We can still get more later
createServletsAndFilters(deployment, deploymentInfo);
//first initialize the temp dir
initializeTempDir(servletContext, deploymentInfo);
//then run the SCI's
for (final ServletContainerInitializerInfo sci : deploymentInfo.getServletContainerInitializers()) {
final InstanceHandle<? extends ServletContainerInitializer> instance = sci.getInstanceFactory().createInstance();
try {
instance.getInstance().onStartup(sci.getHandlesTypes(), servletContext);
} finally {
instance.release();
}
}
deployment.getSessionManager().registerSessionListener(new SessionListenerBridge(deployment, listeners, servletContext));
for(SessionListener listener : deploymentInfo.getSessionListeners()) {
deployment.getSessionManager().registerSessionListener(listener);
}
initializeErrorPages(deployment, deploymentInfo);
initializeMimeMappings(deployment, deploymentInfo);
listeners.contextInitialized();
//run
HttpHandler wrappedHandlers = ServletDispatchingHandler.INSTANCE;
wrappedHandlers = wrapHandlers(wrappedHandlers, deploymentInfo.getInnerHandlerChainWrappers());
wrappedHandlers = new RedirectDirHandler(wrappedHandlers, deployment.getServletPaths());
if(!deploymentInfo.isSecurityDisabled()) {
HttpHandler securityHandler = setupSecurityHandlers(wrappedHandlers);
wrappedHandlers = new PredicateHandler(DispatcherTypePredicate.REQUEST, securityHandler, wrappedHandlers);
}
HttpHandler outerHandlers = wrapHandlers(wrappedHandlers, deploymentInfo.getOuterHandlerChainWrappers());
wrappedHandlers = new PredicateHandler(DispatcherTypePredicate.REQUEST, outerHandlers, wrappedHandlers);
wrappedHandlers = handleDevelopmentModePersistentSessions(wrappedHandlers, deploymentInfo, deployment.getSessionManager(), servletContext);
MetricsCollector metrics = deploymentInfo.getMetricsCollector();
if(metrics != null) {
wrappedHandlers = new MetricsChainHandler(wrappedHandlers, metrics, deployment);
}
if( deploymentInfo.getCrawlerSessionManagerConfig() != null ) {
wrappedHandlers = new CrawlerSessionManagerHandler(deploymentInfo.getCrawlerSessionManagerConfig(), wrappedHandlers);
}
final ServletInitialHandler servletInitialHandler = SecurityActions.createServletInitialHandler(deployment.getServletPaths(), wrappedHandlers, deployment, servletContext);
HttpHandler initialHandler = wrapHandlers(servletInitialHandler, deployment.getDeploymentInfo().getInitialHandlerChainWrappers());
initialHandler = new HttpContinueReadHandler(initialHandler);
if(deploymentInfo.getUrlEncoding() != null) {
initialHandler = Handlers.urlDecodingHandler(deploymentInfo.getUrlEncoding(), initialHandler);
}
deployment.setInitialHandler(initialHandler);
deployment.setServletHandler(servletInitialHandler);
deployment.getServletPaths().invalidate(); //make sure we have a fresh set of servlet paths
servletContext.initDone();
return null;
}
}).call(null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
//any problems with the paths won't get detected until the data is initialize
//so we force initialization here
deployment.getServletPaths().initData();
for(ServletContextListener listener : deploymentInfo.getDeploymentCompleteListeners()) {
listener.contextInitialized(new ServletContextEvent(servletContext));
}
state = State.DEPLOYED;
}
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
deploy
|
servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 1
|
Analyze the following code function for security vulnerabilities
|
LibraryInfo findLibraryOnClasspathWithZipDirectoryEntryScan(String libraryName,
String localePrefix,
String contract, FacesContext ctx, boolean forceScan) {
return classpathResourceHelper.findLibraryWithZipDirectoryEntryScan(libraryName, localePrefix, contract, ctx, forceScan);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLibraryOnClasspathWithZipDirectoryEntryScan
File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
findLibraryOnClasspathWithZipDirectoryEntryScan
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams,
Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
continue;
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateParamsForAuth
File: samples/client/petstore/java/retrofit2-play26/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
|
updateParamsForAuth
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<String, Http.MultipartFormData.FilePart<?>> files() {
return Collections.unmodifiableMap(
super.files().entrySet().stream()
.collect(Collectors.toMap(e -> asNormalKey(e.getKey()), e -> e.getValue())));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: files
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
files
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void finishInstrumentation(IApplicationThread target,
int resultCode, Bundle results) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(target != null ? target.asBinder() : null);
data.writeInt(resultCode);
data.writeBundle(results);
mRemote.transact(FINISH_INSTRUMENTATION_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishInstrumentation
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
finishInstrumentation
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private int runList() {
String type = nextArg();
if (type == null) {
System.err.println("Error: didn't specify type of data to list");
return 1;
}
if ("package".equals(type) || "packages".equals(type)) {
return runListPackages(false);
} else if ("permission-groups".equals(type)) {
return runListPermissionGroups();
} else if ("permissions".equals(type)) {
return runListPermissions();
} else if ("features".equals(type)) {
return runListFeatures();
} else if ("libraries".equals(type)) {
return runListLibraries();
} else if ("instrumentation".equals(type)) {
return runListInstrumentation();
} else if ("users".equals(type)) {
return runListUsers();
} else {
System.err.println("Error: unknown list type '" + type + "'");
return 1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runList
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
runList
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setCommonOutputProperties(final Transformer transformer, final boolean indentOutput)
throws TransformerConfigurationException {
transformer.setOutputProperty(OutputKeys.METHOD, XML);
transformer.setOutputProperty(OutputKeys.ENCODING, UTF_8);
transformer.setOutputProperty(OutputKeys.VERSION, VERSION);
if (indentOutput) {
transformer.setOutputProperty(OutputKeys.INDENT, YES);
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "3");
} else {
transformer.setOutputProperty(OutputKeys.INDENT, NO);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-1000651
- Severity: HIGH
- CVSS Score: 7.5
Description: gh-813 Turn on secure processing feature for XML parsers etc
Function: setCommonOutputProperties
File: stroom-core-server/src/main/java/stroom/entity/server/util/XMLUtil.java
Repository: gchq/stroom
Fixed Code:
public static void setCommonOutputProperties(final Transformer transformer, final boolean indentOutput) {
transformer.setOutputProperty(OutputKeys.METHOD, XML);
transformer.setOutputProperty(OutputKeys.ENCODING, UTF_8);
transformer.setOutputProperty(OutputKeys.VERSION, VERSION);
if (indentOutput) {
transformer.setOutputProperty(OutputKeys.INDENT, YES);
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "3");
} else {
transformer.setOutputProperty(OutputKeys.INDENT, NO);
}
}
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
setCommonOutputProperties
|
stroom-core-server/src/main/java/stroom/entity/server/util/XMLUtil.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 1
|
Analyze the following code function for security vulnerabilities
|
public CELLTYPE getCell(Object propertyId) {
CELLTYPE cell = cells.get(propertyId);
Set<CELLTYPE> cellGroup = getCellGroupForCell(cell);
if (cellGroup != null) {
cell = cellGroups.get(cellGroup);
}
return cell;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCell
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
|
getCell
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasUserDemotedInvalidMsgApp(String pkg, int uid) {
try {
return sINM.hasUserDemotedInvalidMsgApp(pkg, uid);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasUserDemotedInvalidMsgApp
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
hasUserDemotedInvalidMsgApp
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeDescriptions(CellReference cell,
JsonObject descriptions) {
if (cellDescriptionGenerator != null) {
String description = cellDescriptionGenerator
.getDescription(cell);
put(columnKeys.key(cell.getPropertyId()), description,
descriptions);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeDescriptions
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
|
writeDescriptions
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private Publisher<Object> buildCacheInvalidatePublisher(
MethodInvocationContext<Object, Object> context,
CacheOperation cacheOperation,
List<AnnotationValue<CacheInvalidate>> invalidateOperations) {
final Flowable<Object> originalFlowable = Publishers.convertPublisher(context.proceed(), Flowable.class);
return originalFlowable.flatMap((o) -> {
List<Flowable<?>> cacheInvalidates = new ArrayList<>();
for (AnnotationValue<CacheInvalidate> invalidateOperation : invalidateOperations) {
String[] cacheNames = cacheOperation.getCacheInvalidateNames(invalidateOperation);
if (ArrayUtils.isNotEmpty(cacheNames)) {
boolean invalidateAll = invalidateOperation.getRequiredValue(MEMBER_ALL, Boolean.class);
boolean isAsync = invalidateOperation.get(MEMBER_ASYNC, Boolean.class, false);
if (isAsync) {
if (invalidateAll) {
for (String cacheName : cacheNames) {
AsyncCache<?> asyncCache = cacheManager.getCache(cacheName).async();
asyncCache.invalidateAll().whenCompleteAsync((aBoolean, throwable) -> {
if (throwable != null) {
asyncCacheErrorHandler.handleInvalidateError(asyncCache, asRuntimeException(throwable));
}
}, ioExecutor);
}
} else {
CacheKeyGenerator keyGenerator = cacheOperation.getCacheInvalidateKeyGenerator(invalidateOperation);
String[] parameterNames = invalidateOperation.get(MEMBER_PARAMETERS, String[].class, StringUtils.EMPTY_STRING_ARRAY);
Object[] parameterValues = resolveParams(context, parameterNames);
Object key = keyGenerator.generateKey(context, parameterValues);
for (String cacheName : cacheNames) {
AsyncCache<?> asyncCache = cacheManager.getCache(cacheName).async();
asyncCache.invalidate(key).whenCompleteAsync((aBoolean, throwable) -> {
if (throwable != null) {
asyncCacheErrorHandler.handleInvalidateError(asyncCache, asRuntimeException(throwable));
}
}, ioExecutor);
}
}
} else {
final Flowable<Object> cacheInvalidateFlowable = Flowable.create(emitter -> {
if (invalidateAll) {
final CompletableFuture<Void> allFutures = buildInvalidateAllFutures(cacheNames);
allFutures.whenCompleteAsync((aBoolean, throwable) -> {
if (throwable != null) {
SyncCache cache = cacheManager.getCache(cacheNames[0]);
if (asyncCacheErrorHandler.handleInvalidateError(cache, asRuntimeException(throwable))) {
emitter.onError(throwable);
return;
}
emitter.onNext(true);
emitter.onComplete();
} else {
emitter.onNext(o);
emitter.onComplete();
}
}, ioExecutor);
} else {
CacheKeyGenerator keyGenerator = cacheOperation.getCacheInvalidateKeyGenerator(invalidateOperation);
String[] parameterNames = invalidateOperation.get(MEMBER_PARAMETERS, String[].class, StringUtils.EMPTY_STRING_ARRAY);
Object[] parameterValues = resolveParams(context, parameterNames);
Object key = keyGenerator.generateKey(context, parameterValues);
final CompletableFuture<Void> allFutures = buildInvalidateFutures(cacheNames, key);
allFutures.whenCompleteAsync((aBoolean, throwable) -> {
if (throwable != null) {
SyncCache cache = cacheManager.getCache(cacheNames[0]);
if (asyncCacheErrorHandler.handleInvalidateError(cache, key, asRuntimeException(throwable))) {
emitter.onError(throwable);
return;
}
}
emitter.onNext(o);
emitter.onComplete();
}, ioExecutor);
}
}, BackpressureStrategy.ERROR);
cacheInvalidates.add(cacheInvalidateFlowable);
}
}
}
if (!cacheInvalidates.isEmpty()) {
return Flowable.merge(cacheInvalidates).lastOrError().toFlowable();
} else {
return Flowable.just(o);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildCacheInvalidatePublisher
File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
buildCacheInvalidatePublisher
|
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty("Name")
public String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getName
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
try {
return toJSON();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toString
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Object> getData() {
return data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getData
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
getData
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + sourceUserId;
hashCode = 31 * hashCode + uri.hashCode();
hashCode = 31 * hashCode + (prefix ? 1231 : 1237);
return hashCode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
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
|
hashCode
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder d(String data);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: d
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
d
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
appendChar = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endElement
File: src/main/java/com/openkm/extractor/OpenOfficeTextExtractor.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33950
|
HIGH
| 7.5
|
openkm/document-management-system
|
endElement
|
src/main/java/com/openkm/extractor/OpenOfficeTextExtractor.java
|
ce1d82329615aea6aa9f2cc6508c1fe7891e34b5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void reinitializeSession(VaadinRequest request) {
WrappedSession oldSession = request.getWrappedSession();
// Stores all attributes (security key, reference to this context
// instance) so they can be added to the new session
Set<String> attributeNames = oldSession.getAttributeNames();
Map<String, Object> attrs = new HashMap<>(attributeNames.size() * 2);
for (String name : attributeNames) {
Object value = oldSession.getAttribute(name);
if (value instanceof VaadinSession) {
// set flag to avoid cleanup
VaadinSession serviceSession = (VaadinSession) value;
serviceSession.setAttribute(PRESERVE_UNBOUND_SESSION_ATTRIBUTE,
Boolean.TRUE);
}
attrs.put(name, value);
}
// Invalidate the current session
oldSession.invalidate();
// Create a new session
WrappedSession newSession = request.getWrappedSession();
// Restores all attributes (security key, reference to this context
// instance)
for (Entry<String, Object> entry : attrs.entrySet()) {
String name = entry.getKey();
Object value = entry.getValue();
newSession.setAttribute(name, value);
// Ensure VaadinServiceSession knows where it's stored
if (value instanceof VaadinSession) {
VaadinSession serviceSession = (VaadinSession) value;
VaadinService service = serviceSession.getService();
// Use the same lock instance in the new session
service.setSessionLock(newSession,
serviceSession.getLockInstance());
service.storeSession(serviceSession, newSession);
serviceSession.setAttribute(PRESERVE_UNBOUND_SESSION_ATTRIBUTE,
null);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reinitializeSession
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
reinitializeSession
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object makeTransformPerspective(float fovy, float aspect, float zNear, float zFar) {
return CN1Matrix4f.makePerspective(fovy, aspect, zNear, zFar);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeTransformPerspective
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
|
makeTransformPerspective
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void saveAttachmentContent(XWikiAttachment attachment, XWikiContext context) throws XWikiException
{
saveAttachmentContent(attachment, true, true, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveAttachmentContent
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
|
saveAttachmentContent
|
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
|
private void updateSilverStatistics(final String componentId, final String function,
final T component) {
// notify silverstatistics
if (componentId != null && function.equals("Main") || function.startsWith("searchResult") ||
function.startsWith("portlet") || function.equals("GoToFilesTab")) {
// only for instanciable components
SilverStatisticsManager.getInstance()
.addStatAccess(component.getUserId(), new Date(), component.getComponentName(),
component.getSpaceId(), component.getComponentId());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSilverStatistics
File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
updateSilverStatistics
|
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Map<Thread,StackTraceElement[]> dumpAllThreads() {
Map<Thread,StackTraceElement[]> sorted = new TreeMap<Thread,StackTraceElement[]>(new ThreadSorter());
sorted.putAll(Thread.getAllStackTraces());
return sorted;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpAllThreads
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
dumpAllThreads
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Number _nonNullNumber(Number n) {
if (n == null) {
n = Integer.valueOf(0);
}
return n;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _nonNullNumber
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_nonNullNumber
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getSidebarUserMenu(Map<String, Object> data) {
String html = "<ul class=\"user-menu nav nav-tabs nav-stacked main-menu\">";
if ((Boolean) data.get("is_logged_in")) {
User user = (User) data.get("user");
String email = user.getEmail();
if (email == null) {
email = "";
}
if (email.contains(";")) {
email = email.split(";")[0];
}
if (email.contains(",")) {
email = email.split(",")[0];
}
String profileImageTag = "";
if (getPropertyString("userImage").isEmpty()) {
String url = (email != null && !email.isEmpty()) ?
new Gravatar()
.setSize(20)
.setHttps(true)
.setRating(Rating.PARENTAL_GUIDANCE_SUGGESTED)
.setStandardDefaultImage(DefaultImage.IDENTICON)
.getUrl(email)
: "//www.gravatar.com/avatar/default?d=identicon";
profileImageTag = "<img class=\"gravatar\" alt=\"gravatar\" width=\"30\" height=\"30\" data-lazysrc=\""+url+"\" onError=\"this.onerror = '';this.style.display='none';\"/> ";
} else if ("hashVariable".equals(getPropertyString("userImage"))) {
String url = AppUtil.processHashVariable(getPropertyString("userImageUrlHash"), null, StringUtil.TYPE_HTML, null, AppUtil.getCurrentAppDefinition());
if (AppUtil.containsHashVariable(url) || url == null || url.isEmpty()) {
url = data.get("context_path") + "/" + getPathName() + "/user.png";
}
profileImageTag = "<img alt=\"profile\" width=\"30\" height=\"30\" src=\""+url+"\" /> ";
}
html += "<li class=\"mm-profile user-link\">\n"
+ " <a class=\"dropdown\">\n"
+ " "+profileImageTag+"\n"
+ " <span>" + StringUtil.stripHtmlTag(DirectoryUtil.getUserFullName(user), new String[]{}) + "</span>\n"
+ " <small>" + email + "</small>\n"
+ " </a>\n";
html += "<ul>\n";
if (!"true".equals(getPropertyString("profile")) && !user.getReadonly()) {
String activeCss = "";
if (PROFILE.equals(userview.getParamString("menuId"))) {
activeCss = " class=\"active\"";
}
html += " <li "+activeCss+"><a href=\"" + data.get("base_link") + PROFILE +"\"><span><i class=\"fa fa-user\"></i> " + ResourceBundleUtil.getMessage("theme.universal.profile") + "</span></a></li>\n";
}
Object[] shortcut = (Object[]) getProperty("userMenu");
if (shortcut != null && shortcut.length > 0) {
for (Object o : shortcut) {
Map link = (HashMap) o;
String href = link.get("href").toString();
String label = link.get("label").toString();
String target = (link.get("target") == null)?"":link.get("target").toString();
if ("divider".equalsIgnoreCase(label)) {
html += "<li class=\"divider\"></li>\n";
} else if (href.isEmpty()) {
html += "<li class=\"dropdown-menu-title\"><span>" + label + "</span></li>\n";
} else {
if (!href.contains("/")) {
href = data.get("base_link") + href;
}
html += "<li><a href=\"" + href + "\" target=\""+target+"\">" + label + "</a></li>\n";
}
}
}
html += " <li><a href=\"" + data.get("logout_link") + "\"><span><i class=\"fa fa-power-off\"></i> " + ResourceBundleUtil.getMessage("theme.universal.logout") + "</span></a></li>\n";
html += "</ul>";
} else {
String profileImageTag = "";
if (getPropertyString("userImage").isEmpty() || "hashVariable".equals(getPropertyString("userImage"))) {
String url = data.get("context_path") + "/" + getPathName() + "/user.png";
profileImageTag = "<img alt=\"profile\" width=\"30\" height=\"30\" src=\""+url+"\" /> ";
}
html += "<li class=\"mm-profile user-link\">\n"
+ " <a href=\"" + data.get("login_link") + "\" >\n"
+ " "+profileImageTag+"\n"
+ " <span>Visitor</span>\n"
+ " <small class=\"login_link\">" + ResourceBundleUtil.getMessage("ubuilder.login") + "</small>\n"
+ " </a>\n";
}
html += "</li></ul>";
return html;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSidebarUserMenu
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getSidebarUserMenu
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_APPS_CONTROL, conditional = true)
@SupportsCoexistence
public void setUserControlDisabledPackages(@Nullable ComponentName admin,
@NonNull List<String> packages) {
throwIfParentInstance("setUserControlDisabledPackages");
if (mService != null) {
try {
mService.setUserControlDisabledPackages(admin, mContext.getPackageName(), packages);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserControlDisabledPackages
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
|
setUserControlDisabledPackages
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKey(apiKey);
return this;
}
}
throw new RuntimeException("No API key authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApiKey
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setApiKey
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void unwhitelistThreads() {
whitelistedThreads.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unwhitelistThreads
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
unwhitelistThreads
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void resetForgottenPassword(TestUtils setup) throws Exception
{
setup.loginAsSuperAdmin();
String userName = "testUser" + RandomStringUtils.randomAlphanumeric(6);
String password = "password";
String newPassword = "newPassword";
// Create a user
setup.createUser(userName, password, null);
// Make sure we are not logged in and go to the reset password page
setup.forceGuestUser();
ResetPasswordPage resetPasswordPage = ResetPasswordPage.gotoPage();
// Try to reset the password of a non existent user
resetPasswordPage.setUserName("SomeUserThatDoesNotExist");
resetPasswordPage = resetPasswordPage.clickResetPassword();
assertFalse(resetPasswordPage.isResetPasswordSent());
assertTrue(resetPasswordPage.getMessage().contains("user does not exist"));
// Try again
resetPasswordPage = resetPasswordPage.clickRetry();
// Try to reset the password of our user, when he has no email set
resetPasswordPage.setUserName(userName);
resetPasswordPage.clickResetPassword();
assertFalse(resetPasswordPage.isResetPasswordSent());
assertTrue(resetPasswordPage.getMessage().contains("email address not provided"));
// Try again. This time, set the user's email address in the profile
setup.loginAsSuperAdmin();
setup.updateObject("XWiki", userName, "XWiki.XWikiUsers", 0, "email", "foo@bar.com", "form_token",
setup.getSecretToken());
setup.forceGuestUser();
// Actually reset the user's password
resetPasswordPage = ResetPasswordPage.gotoPage();
resetPasswordPage.setUserName(userName);
resetPasswordPage.clickResetPassword();
// Check the result
assertTrue(resetPasswordPage.isResetPasswordSent());
// Check the emails received by the user
assertTrue(this.mail.waitForIncomingEmail(1));
MimeMessage[] receivedEmails = this.mail.getReceivedMessages();
assertEquals(1, receivedEmails.length);
MimeMessage receivedEmail = receivedEmails[0];
assertEquals("Password reset request for " + userName, receivedEmail.getSubject());
String receivedMailContent = getMessageContent(receivedEmail).get("textPart");
String passwordResetLink = getResetLink(receivedMailContent, "xwiki%3AXWiki." + userName);
assertNotNull(passwordResetLink);
// Use the password reset link
setup.gotoPage(passwordResetLink);
// We should now be on the ResetPasswordComplete page
ResetPasswordCompletePage resetPasswordCompletePage = new ResetPasswordCompletePage();
// Check that the link was valid
assertTrue(resetPasswordCompletePage.isResetLinkValid());
resetPasswordCompletePage.setPassword(newPassword);
resetPasswordCompletePage.setPasswordConfirmation(newPassword);
resetPasswordCompletePage = resetPasswordCompletePage.clickSave();
// Check the result
assertTrue(resetPasswordCompletePage.isPasswordSuccessfullyReset());
LoginPage loginPage = resetPasswordCompletePage.clickLogin();
// Check the new password
loginPage.loginAs(userName, newPassword);
assertEquals(userName, setup.getLoggedInUserName());
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2021-32731
- Severity: MEDIUM
- CVSS Score: 5.0
Description: XWIKI-18400: Wrong message after reset password
Function: resetForgottenPassword
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/ResetPasswordIT.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Test
public void resetForgottenPassword(TestUtils setup) throws Exception
{
setup.loginAsSuperAdmin();
String userName = "testUser" + RandomStringUtils.randomAlphanumeric(6);
String password = "password";
String newPassword = "newPassword";
// Create a user
setup.createUser(userName, password, null);
// Make sure we are not logged in and go to the reset password page
setup.forceGuestUser();
ResetPasswordPage resetPasswordPage = ResetPasswordPage.gotoPage();
// Try to reset the password of a non existent user
resetPasswordPage.setUserName("SomeUserThatDoesNotExist");
resetPasswordPage = resetPasswordPage.clickResetPassword();
assertFalse(resetPasswordPage.isResetPasswordSent());
assertTrue(resetPasswordPage.getMessage().contains("user does not exist"));
// Try again
resetPasswordPage = resetPasswordPage.clickRetry();
// Try to reset the password of our user, when he has no email set
resetPasswordPage.setUserName(userName);
resetPasswordPage.clickResetPassword();
assertFalse(resetPasswordPage.isResetPasswordSent());
assertTrue(resetPasswordPage.getMessage().contains("email address not provided"));
// Try again. This time, set the user's email address in the profile
setup.loginAsSuperAdmin();
setup.updateObject("XWiki", userName, "XWiki.XWikiUsers", 0, "email", "foo@bar.com", "form_token",
setup.getSecretToken());
setup.forceGuestUser();
// Actually reset the user's password
resetPasswordPage = ResetPasswordPage.gotoPage();
resetPasswordPage.setUserName(userName);
ResetPasswordPage newResetPasswordPage = resetPasswordPage.clickResetPassword();
assertTrue(newResetPasswordPage.getMessage().contains("An e-mail was sent"),
"Actual message: " + newResetPasswordPage.getMessage());
assertFalse(newResetPasswordPage.getMessage().contains("foo@bar.com"),
"Actual message: " + newResetPasswordPage.getMessage());
// Check the result
assertTrue(resetPasswordPage.isResetPasswordSent());
// Check the emails received by the user
assertTrue(this.mail.waitForIncomingEmail(1));
MimeMessage[] receivedEmails = this.mail.getReceivedMessages();
assertEquals(1, receivedEmails.length);
MimeMessage receivedEmail = receivedEmails[0];
assertEquals("Password reset request for " + userName, receivedEmail.getSubject());
String receivedMailContent = getMessageContent(receivedEmail).get("textPart");
String passwordResetLink = getResetLink(receivedMailContent, "xwiki%3AXWiki." + userName);
assertNotNull(passwordResetLink);
// Use the password reset link
setup.gotoPage(passwordResetLink);
// We should now be on the ResetPasswordComplete page
ResetPasswordCompletePage resetPasswordCompletePage = new ResetPasswordCompletePage();
// Check that the link was valid
assertTrue(resetPasswordCompletePage.isResetLinkValid());
resetPasswordCompletePage.setPassword(newPassword);
resetPasswordCompletePage.setPasswordConfirmation(newPassword);
resetPasswordCompletePage = resetPasswordCompletePage.clickSave();
// Check the result
assertTrue(resetPasswordCompletePage.isPasswordSuccessfullyReset());
LoginPage loginPage = resetPasswordCompletePage.clickLogin();
// Check the new password
loginPage.loginAs(userName, newPassword);
assertEquals(userName, setup.getLoggedInUserName());
}
|
[
"CWE-200"
] |
CVE-2021-32731
|
MEDIUM
| 5
|
xwiki/xwiki-platform
|
resetForgottenPassword
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/ResetPasswordIT.java
|
0cf716250b3645a5974c80d8336dcdf885749dff
| 1
|
Analyze the following code function for security vulnerabilities
|
IPage<SysUser> getUserByDepId(Page page, @Param("departId") String departId, @Param("username") String username);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserByDepId
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
getUserByDepId
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected OortComet findComet(String cometURL) {
return _membership.findComet(cometURL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findComet
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
findComet
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getRequestedPasswordMinimumUpperCase(int userId) {
return getDevicePolicyManager().getPasswordMinimumUpperCase(null, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestedPasswordMinimumUpperCase
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
getRequestedPasswordMinimumUpperCase
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void afterFeaturesReceived() throws SecurityRequiredException, NotConnectedException, InterruptedException {
StartTls startTlsFeature = getFeature(StartTls.ELEMENT, StartTls.NAMESPACE);
if (startTlsFeature != null) {
if (startTlsFeature.required() && config.getSecurityMode() == SecurityMode.disabled) {
notifyConnectionError(new SecurityRequiredByServerException());
return;
}
if (config.getSecurityMode() != ConnectionConfiguration.SecurityMode.disabled) {
sendNonza(new StartTls());
}
}
// If TLS is required but the server doesn't offer it, disconnect
// from the server and throw an error. First check if we've already negotiated TLS
// and are secure, however (features get parsed a second time after TLS is established).
if (!isSecureConnection() && startTlsFeature == null
&& getConfiguration().getSecurityMode() == SecurityMode.required) {
throw new SecurityRequiredByClientException();
}
if (getSASLAuthentication().authenticationSuccessful()) {
// If we have received features after the SASL has been successfully completed, then we
// have also *maybe* received, as it is an optional feature, the compression feature
// from the server.
maybeCompressFeaturesReceived.reportSuccess();
}
}
|
Vulnerability Classification:
- CWE: CWE-362
- CVE: CVE-2016-10027
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Move TLS Required check at the end of connect()
It was a *very* bad idea to perform the SecurityMode.Required check in
the connection's reader thread and not at the end of
AbstractXMPPConnectin's connect(). :/
This behavior dates back to 8e750912a765f77a4f178a4f307a8b42c2afb5ae
Fixes SMACK-739
Function: afterFeaturesReceived
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
Fixed Code:
@Override
protected void afterFeaturesReceived() throws NotConnectedException, InterruptedException {
StartTls startTlsFeature = getFeature(StartTls.ELEMENT, StartTls.NAMESPACE);
if (startTlsFeature != null) {
if (startTlsFeature.required() && config.getSecurityMode() == SecurityMode.disabled) {
notifyConnectionError(new SecurityRequiredByServerException());
return;
}
if (config.getSecurityMode() != ConnectionConfiguration.SecurityMode.disabled) {
sendNonza(new StartTls());
}
}
if (getSASLAuthentication().authenticationSuccessful()) {
// If we have received features after the SASL has been successfully completed, then we
// have also *maybe* received, as it is an optional feature, the compression feature
// from the server.
maybeCompressFeaturesReceived.reportSuccess();
}
}
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
afterFeaturesReceived
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setKeyguardIndicationController(
KeyguardIndicationController keyguardIndicationController) {
mIndicationController = keyguardIndicationController;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyguardIndicationController
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setKeyguardIndicationController
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeAllHelperUtilities() {
_helperUtilitiesMaps.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllHelperUtilities
File: portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
Repository: samuelkong/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2963
|
MEDIUM
| 4.3
|
samuelkong/liferay-portal
|
removeAllHelperUtilities
|
portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
|
5db1f7622e8e2c9a559ef0145a0f04c5854a1e8b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readFieldValues(EmulatedFieldsForLoading emulatedFields)
throws OptionalDataException, InvalidClassException, IOException {
EmulatedFields.ObjectSlot[] slots = emulatedFields.emulatedFields().slots();
for (ObjectSlot element : slots) {
element.defaulted = false;
Class<?> type = element.field.getType();
if (type == int.class) {
element.fieldValue = input.readInt();
} else if (type == byte.class) {
element.fieldValue = input.readByte();
} else if (type == char.class) {
element.fieldValue = input.readChar();
} else if (type == short.class) {
element.fieldValue = input.readShort();
} else if (type == boolean.class) {
element.fieldValue = input.readBoolean();
} else if (type == long.class) {
element.fieldValue = input.readLong();
} else if (type == float.class) {
element.fieldValue = input.readFloat();
} else if (type == double.class) {
element.fieldValue = input.readDouble();
} else {
// Either array or Object
try {
element.fieldValue = readObject();
} catch (ClassNotFoundException cnf) {
// WARNING- Not sure this is the right thing to do. Write
// test case.
throw new InvalidClassException(cnf.toString());
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFieldValues
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readFieldValues
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void incrementDownvotes() {
if (this.downvotes == null) {
this.downvotes = 1L;
} else {
this.downvotes = this.downvotes + 1L;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: incrementDownvotes
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
incrementDownvotes
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOldestFileModificationTime(long oldestFileModificationTime) {
this.oldestFileModificationTime = oldestFileModificationTime;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOldestFileModificationTime
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
setOldestFileModificationTime
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
@MediumTest
@Test
public void testAutoSpeakerphoneOutgoingTransmitOnly() throws Exception {
// Start an incoming video call.
IdPair ids = startAndMakeActiveOutgoingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA,
VideoProfile.STATE_TX_ENABLED);
verifyAudioRoute(CallAudioState.ROUTE_SPEAKER);
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21283
- Severity: MEDIUM
- CVSS Score: 5.5
Description: [conflict] Resolve StatusHints image exploit across user. am: a853f6ba61
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/23463634
Fixes: 285211549
Fixes: 280797684
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41042bd0c8e1e47c19dfdb2a378c70d2090b1e15)
Merged-In: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7
Change-Id: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7
Function: testAutoSpeakerphoneOutgoingTransmitOnly
File: tests/src/com/android/server/telecom/tests/VideoCallTests.java
Repository: android
Fixed Code:
@MediumTest
@Test
public void testAutoSpeakerphoneOutgoingTransmitOnly() throws Exception {
// Start an incoming video call.
IdPair ids = startAndMakeActiveOutgoingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA,
VideoProfile.STATE_TX_ENABLED, null);
verifyAudioRoute(CallAudioState.ROUTE_SPEAKER);
}
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testAutoSpeakerphoneOutgoingTransmitOnly
|
tests/src/com/android/server/telecom/tests/VideoCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 1
|
Analyze the following code function for security vulnerabilities
|
public int getXWikiPreferenceAsInt(String preference, String fallbackParameter, int defaultValue,
XWikiContext context)
{
return NumberUtils.toInt(getXWikiPreference(preference, fallbackParameter, "", context), defaultValue);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXWikiPreferenceAsInt
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
|
getXWikiPreferenceAsInt
|
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 SessionFactory injectInSessionFactory(Configuration config) throws XWikiException
{
return config.buildSessionFactory();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectInSessionFactory
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
injectInSessionFactory
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static String getNameWithoutExtension(String file) {
checkNotNull(file);
String fileName = new File(file).getName();
int dotIndex = fileName.lastIndexOf('.');
return (dotIndex == -1) ? fileName : fileName.substring(0, dotIndex);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNameWithoutExtension
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
getNameWithoutExtension
|
android/guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Media createMedia(final String uri, boolean isVideo, final Runnable onCompletion) throws IOException {
if (getActivity() == null) {
return null;
}
if(!uri.startsWith(FileSystemStorage.getInstance().getAppHomePath())) {
if(!checkForPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, "This is required to play media")){
return null;
}
}
if (uri.startsWith("file://")) {
return createMedia(removeFilePrefix(uri), isVideo, onCompletion);
}
File file = null;
if (uri.indexOf(':') < 0) {
// use a file object to play to try and workaround this issue:
// http://code.google.com/p/android/issues/detail?id=4124
file = new File(uri);
}
Media retVal;
if (isVideo) {
final AndroidImplementation.Video[] video = new AndroidImplementation.Video[1];
final boolean[] flag = new boolean[1];
final File f = file;
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
VideoView v = new VideoView(getActivity());
v.setZOrderMediaOverlay(true);
if (f != null) {
v.setVideoURI(Uri.fromFile(f));
} else {
v.setVideoURI(Uri.parse(uri));
}
video[0] = new AndroidImplementation.Video(v, getActivity(), onCompletion);
flag[0] = true;
synchronized (flag) {
flag.notify();
}
}
});
while (!flag[0]) {
synchronized (flag) {
try {
flag.wait(100);
} catch (InterruptedException ex) {
}
}
}
return video[0];
} else {
MediaPlayer player;
if (file != null) {
FileInputStream is = new FileInputStream(file);
player = new MediaPlayer();
player.setDataSource(is.getFD());
player.prepare();
} else {
player = MediaPlayer.create(getActivity(), Uri.parse(uri));
}
retVal = new Audio(getActivity(), player, null, onCompletion);
}
return retVal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMedia
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
|
createMedia
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean removeProcessLocked(ProcessRecord app,
boolean callerWillRestart, boolean allowRestart, String reason) {
final String name = app.processName;
final int uid = app.uid;
if (DEBUG_PROCESSES) Slog.d(TAG_PROCESSES,
"Force removing proc " + app.toShortString() + " (" + name + "/" + uid + ")");
ProcessRecord old = mProcessNames.get(name, uid);
if (old != app) {
// This process is no longer active, so nothing to do.
Slog.w(TAG, "Ignoring remove of inactive process: " + app);
return false;
}
removeProcessNameLocked(name, uid);
if (mHeavyWeightProcess == app) {
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
boolean needRestart = false;
if (app.pid > 0 && app.pid != MY_PID) {
int pid = app.pid;
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.remove(pid);
mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
}
mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
if (app.isolated) {
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
}
boolean willRestart = false;
if (app.persistent && !app.isolated) {
if (!callerWillRestart) {
willRestart = true;
} else {
needRestart = true;
}
}
app.kill(reason, true);
handleAppDiedLocked(app, willRestart, allowRestart);
if (willRestart) {
removeLruProcessLocked(app);
addAppLocked(app.info, false, null /* ABI override */);
}
} else {
mRemovedProcesses.add(app);
}
return needRestart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProcessLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
removeProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Optional<MemoryAppender> getMemoryAppender(Configuration config) {
return config.getAppenders().values().stream().filter(MemoryAppender.class::isInstance).map(MemoryAppender.class::cast).findFirst();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMemoryAppender
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
getMemoryAppender
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder e(String name) {
return element(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: e
File: src/main/java/com/jamesmurty/utils/XMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
e
|
src/main/java/com/jamesmurty/utils/XMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBoundSqlInterceptor(BoundSqlInterceptor boundSqlInterceptor) {
this.boundSqlInterceptor = boundSqlInterceptor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBoundSqlInterceptor
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
setBoundSqlInterceptor
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private final void sendPackageBroadcastLocked(int cmd, String[] packages, int userId) {
for (int i = mLruProcesses.size() - 1 ; i >= 0 ; i--) {
ProcessRecord r = mLruProcesses.get(i);
if (r.thread != null && (userId == UserHandle.USER_ALL || r.userId == userId)) {
try {
r.thread.dispatchPackageBroadcast(cmd, packages);
} catch (RemoteException ex) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendPackageBroadcastLocked
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
|
sendPackageBroadcastLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTradeType(String tradeType) {
this.tradeType = tradeType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTradeType
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setTradeType
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getImportance(String pkg, int uid) {
enforceSystemOrSystemUI("Caller not system or systemui");
return mRankingHelper.getImportance(pkg, uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImportance
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
|
getImportance
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("discardMediaPackage")
@RestQuery(name = "discardMediaPackage", description = "Discard a media package", restParameters = { @RestParameter(description = "Given media package to be destroyed", isRequired = true, name = "mediaPackage", type = RestParameter.Type.TEXT) }, reponses = {
@RestResponse(description = "", responseCode = HttpServletResponse.SC_OK),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR) }, returnDescription = "")
public Response discardMediaPackage(@FormParam("mediaPackage") String mpx) {
logger.debug("discardMediaPackage(MediaPackage): {}", mpx);
try {
MediaPackage mp = factory.newMediaPackageBuilder().loadFromXml(mpx);
ingestService.discardMediaPackage(mp);
return Response.ok().build();
} catch (Exception e) {
logger.warn(e.getMessage(), e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: discardMediaPackage
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
discardMediaPackage
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyStartedWakingUp() {
if (DEBUG) Log.d(TAG, "notifyStartedWakingUp");
mHandler.sendEmptyMessage(NOTIFY_STARTED_WAKING_UP);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyStartedWakingUp
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
notifyStartedWakingUp
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addImplicitCollection(Class ownerType, String fieldName) {
addImplicitCollection(ownerType, fieldName, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addImplicitCollection
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
|
addImplicitCollection
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private String libraryNameFromContracts(String libraryName, List<String> contracts) {
// If the library name is equal to one of the contracts,
// assume the resource to be found is within that contract
for (String contract : contracts) {
if (contract.equals(libraryName)) {
return null;
}
}
return libraryName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: libraryNameFromContracts
File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
libraryNameFromContracts
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
private static ZygoteState openZygoteSocketIfNeeded(String abi) throws ZygoteStartFailedEx {
if (primaryZygoteState == null || primaryZygoteState.isClosed()) {
try {
primaryZygoteState = ZygoteState.connect(ZYGOTE_SOCKET);
} catch (IOException ioe) {
throw new ZygoteStartFailedEx("Error connecting to primary zygote", ioe);
}
}
if (primaryZygoteState.matches(abi)) {
return primaryZygoteState;
}
// The primary zygote didn't match. Try the secondary.
if (secondaryZygoteState == null || secondaryZygoteState.isClosed()) {
try {
secondaryZygoteState = ZygoteState.connect(SECONDARY_ZYGOTE_SOCKET);
} catch (IOException ioe) {
throw new ZygoteStartFailedEx("Error connecting to secondary zygote", ioe);
}
}
if (secondaryZygoteState.matches(abi)) {
return secondaryZygoteState;
}
throw new ZygoteStartFailedEx("Unsupported zygote ABI: " + abi);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openZygoteSocketIfNeeded
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
openZygoteSocketIfNeeded
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public void changeSendCompression(ICompressor comp) {
tc.changeSendCompression(comp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: changeSendCompression
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
changeSendCompression
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(USE_FINGERPRINT)
public List<Fingerprint> getEnrolledFingerprints(int userId) {
if (mService != null) try {
return mService.getEnrolledFingerprints(userId, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnrolledFingerprints
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
getEnrolledFingerprints
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unlockScreen() {
if (wakeLock != null && wakeLock.isHeld()) {
wakeLock.release();
wakeLock = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unlockScreen
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
unlockScreen
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
default Optional<ZonedDateTime> findDate(CharSequence name) {
try {
return findFirst(name).map((str) -> {
LocalDateTime localDateTime = LocalDateTime.parse(str, DateTimeFormatter.RFC_1123_DATE_TIME);
return ZonedDateTime.of(localDateTime, ZoneId.of("GMT"));
}
);
} catch (DateTimeParseException e) {
return Optional.empty();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findDate
File: http/src/main/java/io/micronaut/http/HttpHeaders.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
findDate
|
http/src/main/java/io/micronaut/http/HttpHeaders.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void normalize() {
doc.normalize();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalize
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
normalize
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isDoubleQuotedExecutableEscaped()
{
return doubleQuotedExecutableEscaped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDoubleQuotedExecutableEscaped
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
isDoubleQuotedExecutableEscaped
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addAttachmentAndUpdateView(Uri contentUri) {
if (contentUri == null) {
return;
}
try {
if (handleSpecialAttachmentUri(contentUri)) {
return;
}
addAttachmentAndUpdateView(mAttachmentsView.generateLocalAttachment(contentUri));
} catch (AttachmentFailureException e) {
LogUtils.e(LOG_TAG, e, "Error adding attachment");
showErrorToast(getResources().getString(
e.getErrorRes(),
AttachmentUtils.convertToHumanReadableSize(
getApplicationContext(), mAccount.settings.getMaxAttachmentSize())));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAttachmentAndUpdateView
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
addAttachmentAndUpdateView
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProviderMetadata(final OIDCProviderMetadata providerMetadata) {
this.providerMetadata = providerMetadata;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProviderMetadata
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
setProviderMetadata
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
// also set the date format for model (de)serialization with Date properties
this.json.setDateFormat((DateFormat) dateFormat.clone());
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDateFormat
File: samples/client/petstore/java/retrofit2-play26/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
|
setDateFormat
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final void refreshUi() {
final long diff = SystemClock.elapsedRealtime() - mLastUiRefresh;
if (diff > Config.REFRESH_UI_INTERVAL) {
mRefreshUiHandler.removeCallbacks(mRefreshUiRunnable);
runOnUiThread(mRefreshUiRunnable);
} else {
final long next = Config.REFRESH_UI_INTERVAL - diff;
mRefreshUiHandler.removeCallbacks(mRefreshUiRunnable);
mRefreshUiHandler.postDelayed(mRefreshUiRunnable, next);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: refreshUi
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
|
refreshUi
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public void requestSmAcknowledgement() throws StreamManagementNotEnabledException, NotConnectedException, InterruptedException {
if (!isSmEnabled()) {
throw new StreamManagementException.StreamManagementNotEnabledException();
}
requestSmAcknowledgementInternal();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestSmAcknowledgement
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
requestSmAcknowledgement
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setLockScreenShown(boolean keyguardShowing, boolean aodShowing) {
if (checkCallingPermission(android.Manifest.permission.DEVICE_POWER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.DEVICE_POWER);
}
synchronized (mGlobalLock) {
final long ident = Binder.clearCallingIdentity();
if (mKeyguardShown != keyguardShowing) {
mKeyguardShown = keyguardShowing;
final Message msg = PooledLambda.obtainMessage(
ActivityManagerInternal::reportCurKeyguardUsageEvent, mAmInternal,
keyguardShowing);
mH.sendMessage(msg);
}
try {
mRootWindowContainer.forAllDisplays(displayContent -> {
mKeyguardController.setKeyguardShown(displayContent.getDisplayId(),
keyguardShowing, aodShowing);
});
} finally {
Binder.restoreCallingIdentity(ident);
}
}
mH.post(() -> {
for (int i = mScreenObservers.size() - 1; i >= 0; i--) {
mScreenObservers.get(i).onKeyguardStateChanged(keyguardShowing);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLockScreenShown
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
setLockScreenShown
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void pushInputSource(XMLInputSource inputSource) {
final Reader reader = getReader(inputSource);
fCurrentEntityStack.push(fCurrentEntity);
String encoding = inputSource.getEncoding();
String publicId = inputSource.getPublicId();
String baseSystemId = inputSource.getBaseSystemId();
String literalSystemId = inputSource.getSystemId();
String expandedSystemId = expandSystemId(literalSystemId, baseSystemId);
fCurrentEntity = new CurrentEntity(reader, encoding,
publicId, baseSystemId,
literalSystemId, expandedSystemId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushInputSource
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
pushInputSource
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.