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
|
@VisibleForTesting
public void sendDoubleTapForTest(long timeMs, int x, int y) {
if (mNativeContentViewCore == 0) return;
nativeDoubleTap(mNativeContentViewCore, timeMs, x, y);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendDoubleTapForTest
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
sendDoubleTapForTest
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return this;
}
}
throw new RuntimeException("No API key authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApiKeyPrefix
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
|
setApiKeyPrefix
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getSettingValue(Bundle args) {
return (args != null) ? args.getString(Settings.NameValueTable.VALUE) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSettingValue
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
getSettingValue
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isValidRedirectUrl(String redirectUrl) {
log.info("Validating redirect URL [{}]", redirectUrl);
URL url;
try {
url = new URL(redirectUrl);
String protocol = url.getProtocol();
String host = url.getHost();
if(insertDocumentSupportedProtocols.stream().noneMatch(p -> p.equalsIgnoreCase(protocol))) {
if(insertDocumentSupportedProtocols.size() == 1 && insertDocumentSupportedProtocols.get(0).equalsIgnoreCase("all")) {
log.warn("Warning: All protocols are supported for presentation download. It is recommended to only allow HTTPS.");
} else {
log.error("Invalid protocol [{}]", protocol);
return false;
}
}
if(insertDocumentBlockedHosts.stream().anyMatch(h -> h.equalsIgnoreCase(host))) {
log.error("Attempted to download from blocked host [{}]", host);
return false;
}
} catch(MalformedURLException e) {
log.error("Malformed URL [{}]", redirectUrl);
return false;
}
try {
InetAddress[] addresses = InetAddress.getAllByName(url.getHost());
InetAddressValidator validator = InetAddressValidator.getInstance();
boolean localhostBlocked = insertDocumentBlockedHosts.stream().anyMatch(h -> h.equalsIgnoreCase("localhost"));
for(InetAddress address: addresses) {
if(!validator.isValid(address.getHostAddress())) {
log.error("Invalid address [{}]", address.getHostAddress());
return false;
}
if(localhostBlocked && !redirectUrl.equalsIgnoreCase(defaultUploadedPresentation)) {
if(address.isAnyLocalAddress()) {
log.error("Address [{}] is a local address", address.getHostAddress());
return false;
}
if(address.isLoopbackAddress()) {
log.error("Address [{}] is a loopback address", address.getHostAddress());
return false;
}
}
}
} catch(UnknownHostException e) {
log.error("Unknown host [{}]", url.getHost());
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidRedirectUrl
File: bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43798
|
MEDIUM
| 5.4
|
bigbluebutton
|
isValidRedirectUrl
|
bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java
|
02ba4c6ff8e78a0f4384ad1b7c7367c5a90376e8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSession(Session session)
{
WebDriver.Options options = getDriver().manage();
options.deleteAllCookies();
if (session != null) {
for (Cookie cookie : session.getCookies()) {
// Using a cookie for single component domain (i.e., without '.', like 'localhost' or 'xwikiweb')
// apparently triggers the following error in firefox:
// org.openqa.selenium.UnableToSetCookieException:
//[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)
// [nsICookieManager.add]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"
// location: "JS frame :: chrome://marionette/content/cookie.js :: cookie.add :: line 177" data: no]
//
// According to the following discussions:
// - https://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain
// - https://github.com/mozilla/geckodriver/issues/1579
// a working solution is to put null in the cookie domain.
// Now we might need to fix this in our real code, but the situation is not quite clear for me.
if (cookie.getDomain() !=null && !cookie.getDomain().contains(".")) {
cookie = new Cookie(cookie.getName(), cookie.getValue(), null, cookie.getPath(),
cookie.getExpiry(), cookie.isSecure(), cookie.isHttpOnly());
}
options.addCookie(cookie);
}
}
if (session != null && !StringUtils.isEmpty(session.getSecretToken())) {
this.secretToken = session.getSecretToken();
} else {
recacheSecretToken();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSession
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setSession
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getValidationScript()
{
if (this.validationScript == null) {
return "";
} else {
return this.validationScript;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValidationScript
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
|
getValidationScript
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void register(String typeName, Class type) {
typeMapping.putIfAbsent(typeName, type);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: register
File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
Repository: alibaba/fastjson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-25845
|
MEDIUM
| 6.8
|
alibaba/fastjson
|
register
|
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
|
8f3410f81cbd437f7c459f8868445d50ad301f15
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> T unmarshal(final Class<T> clazz, final File file, final boolean validate) {
FileReader reader = null;
try {
reader = new FileReader(file);
return unmarshal(clazz, new InputSource(reader), null, validate, false);
} catch (final FileNotFoundException e) {
throw EXCEPTION_TRANSLATOR.translate("reading " + file, e);
} finally {
IOUtils.closeQuietly(reader);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshal
File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-0871
|
MEDIUM
| 6.1
|
OpenNMS/opennms
|
unmarshal
|
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
|
3c17231714e3d55809efc580a05734ed530f9ad4
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeUserData(int userHandle) {
final boolean isOrgOwned;
synchronized (getLockObject()) {
if (userHandle == UserHandle.USER_SYSTEM) {
Slogf.w(LOG_TAG, "Tried to remove device policy file for user 0! Ignoring.");
return;
}
updatePasswordQualityCacheForUserGroup(userHandle);
mPolicyCache.onUserRemoved(userHandle);
if (isManagedProfile(userHandle)) {
clearManagedProfileApnUnchecked();
}
isOrgOwned = mOwners.isProfileOwnerOfOrganizationOwnedDevice(userHandle);
// Clear any restrictions set by the a profile owner and the parent admin.
final ActiveAdmin admin = getProfileOwnerLocked(userHandle);
if (admin != null) {
admin.userRestrictions = null;
final ActiveAdmin parentAdmin = admin.getParentActiveAdmin();
if (parentAdmin != null) {
parentAdmin.userRestrictions = null;
}
pushUserRestrictions(userHandle);
}
mOwners.removeProfileOwner(userHandle);
mOwners.writeProfileOwner(userHandle);
pushScreenCapturePolicy(userHandle);
DevicePolicyData policy = mUserData.get(userHandle);
if (policy != null) {
mUserData.remove(userHandle);
}
File policyFile =
new File(mPathProvider.getUserSystemDirectory(userHandle), DEVICE_POLICIES_XML);
policyFile.delete();
Slogf.i(LOG_TAG, "Removed device policy file " + policyFile.getAbsolutePath());
}
if (isOrgOwned) {
final UserInfo primaryUser = mUserManager.getPrimaryUser();
if (primaryUser != null) {
clearOrgOwnedProfileOwnerDeviceWidePolicies(primaryUser.id);
} else {
Slogf.wtf(LOG_TAG, "Was unable to get primary user.");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUserData
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
removeUserData
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
@MustNotContainNull
private static List<JMenuItem> putAllItemsAsSection(@Nonnull final JPopupMenu menu, @Nullable final JMenu subMenu, @Nonnull @MustNotContainNull final List<JMenuItem> items) {
if (!items.isEmpty()) {
if (menu.getComponentCount() > 0) {
menu.add(UI_COMPO_FACTORY.makeMenuSeparator());
}
for (final JMenuItem i : items) {
if (subMenu == null) {
menu.add(i);
} else {
subMenu.add(i);
}
}
if (subMenu != null) {
menu.add(subMenu);
}
}
return items;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putAllItemsAsSection
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
putAllItemsAsSection
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public OptionalEntity<FileConfig> getFileConfig() {
return OptionalUtil.ofNullable(fileConfig);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFileConfig
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000822
|
HIGH
| 7.5
|
codelibs/fess
|
getFileConfig
|
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
|
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ClientTransport.Factory> getClientTransportFactories() {
return _transportFactories;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientTransportFactories
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
|
getClientTransportFactories
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public PollingResult poll( TaskListener listener ) {
SCM scm = getScm();
if (scm==null) {
listener.getLogger().println(Messages.AbstractProject_NoSCM());
return NO_CHANGES;
}
if (!isBuildable()) {
listener.getLogger().println(Messages.AbstractProject_Disabled());
return NO_CHANGES;
}
R lb = getLastBuild();
if (lb==null) {
listener.getLogger().println(Messages.AbstractProject_NoBuilds());
return isInQueue() ? NO_CHANGES : BUILD_NOW;
}
if (pollingBaseline==null) {
R success = getLastSuccessfulBuild(); // if we have a persisted baseline, we'll find it by this
for (R r=lb; r!=null; r=r.getPreviousBuild()) {
SCMRevisionState s = r.getAction(SCMRevisionState.class);
if (s!=null) {
pollingBaseline = s;
break;
}
if (r==success) break; // searched far enough
}
// NOTE-NO-BASELINE:
// if we don't have baseline yet, it means the data is built by old Hudson that doesn't set the baseline
// as action, so we need to compute it. This happens later.
}
try {
SCMPollListener.fireBeforePolling(this, listener);
PollingResult r = _poll(listener, scm, lb);
SCMPollListener.firePollingSuccess(this,listener, r);
return r;
} catch (AbortException e) {
listener.getLogger().println(e.getMessage());
listener.fatalError(Messages.AbstractProject_Aborted());
LOGGER.log(Level.FINE, "Polling "+this+" aborted",e);
SCMPollListener.firePollingFailed(this, listener,e);
return NO_CHANGES;
} catch (IOException e) {
e.printStackTrace(listener.fatalError(e.getMessage()));
SCMPollListener.firePollingFailed(this, listener,e);
return NO_CHANGES;
} catch (InterruptedException e) {
e.printStackTrace(listener.fatalError(Messages.AbstractProject_PollingABorted()));
SCMPollListener.firePollingFailed(this, listener,e);
return NO_CHANGES;
} catch (RuntimeException e) {
SCMPollListener.firePollingFailed(this, listener,e);
throw e;
} catch (Error e) {
SCMPollListener.firePollingFailed(this, listener,e);
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: poll
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
poll
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@HotPath(caller = HotPath.PROCESS_CHANGE)
@Override
public void onCleanUpApplicationRecord(WindowProcessController proc) {
synchronized (mGlobalLockWithoutBoost) {
if (proc == mHomeProcess) {
mHomeProcess = null;
}
if (proc == mPreviousProcess) {
mPreviousProcess = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCleanUpApplicationRecord
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
|
onCleanUpApplicationRecord
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkPartialSigningWithUser() {
if (signing == SigningState.FULL && JNLPRuntime.isVerifying()) {
signing = SigningState.PARTIAL;
try {
securityDelegate.promptUserOnPartialSigning();
} catch (LaunchException e) {
throw new RuntimeException("The signed applet required loading of unsigned code from the codebase, "
+ "which the user refused", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPartialSigningWithUser
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
checkPartialSigningWithUser
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyContent(byte[] storedMac) throws IOException {
if (getLocalFileHeader().isDataDescriptorExists()
&& CompressionMethod.DEFLATE.equals(Zip4jUtil.getCompressionMethod(getLocalFileHeader()))) {
// Skip content verification in case of Deflate compression and if data descriptor exists.
// In this case, we do not know the exact size of compressed data before hand and it is possible that we read
// and pass more than required data into inflater, thereby corrupting the aes mac bytes.
// See usage of PushBackInputStream in the project for how this push back of data is done
// Unfortunately, in this case we cannot perform a content verification and have to skip
return;
}
byte[] calculatedMac = getDecrypter().getCalculatedAuthenticationBytes();
byte[] first10BytesOfCalculatedMac = new byte[AES_AUTH_LENGTH];
System.arraycopy(calculatedMac, 0, first10BytesOfCalculatedMac, 0, InternalZipConstants.AES_AUTH_LENGTH);
if (!Arrays.equals(storedMac, first10BytesOfCalculatedMac)) {
throw new IOException("Reached end of data for this entry, but aes verification failed");
}
}
|
Vulnerability Classification:
- CWE: CWE-346
- CVE: CVE-2023-22899
- Severity: MEDIUM
- CVSS Score: 5.9
Description: #485 Check for MAC even when DataDescritor exists
Function: verifyContent
File: src/main/java/net/lingala/zip4j/io/inputstream/AesCipherInputStream.java
Repository: srikanth-lingala/zip4j
Fixed Code:
private void verifyContent(byte[] storedMac) throws IOException {
byte[] calculatedMac = getDecrypter().getCalculatedAuthenticationBytes();
byte[] first10BytesOfCalculatedMac = new byte[AES_AUTH_LENGTH];
System.arraycopy(calculatedMac, 0, first10BytesOfCalculatedMac, 0, InternalZipConstants.AES_AUTH_LENGTH);
if (!Arrays.equals(storedMac, first10BytesOfCalculatedMac)) {
throw new IOException("Reached end of data for this entry, but aes verification failed");
}
}
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
verifyContent
|
src/main/java/net/lingala/zip4j/io/inputstream/AesCipherInputStream.java
|
597b31afb473a40e8252de5b5def1876bab198d3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCommentOpened(AjaxRequestTarget target, CodeComment comment) {
state.commentId = comment.getId();
state.position = SourceRendererProvider.getPosition(Preconditions.checkNotNull(comment.mapRange(state.blobIdent)));
pushState(target);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCommentOpened
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
onCommentOpened
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getHeight() {
return this.getData("height");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeight
File: src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-1231
|
MEDIUM
| 4.3
|
plantuml
|
getHeight
|
src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
|
c9137be051ce98b3e3e27f65f54ec7d9f8886903
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toString() {
return super.toString().toLowerCase();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
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
|
toString
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void appendToSubject(VFSLeaf file, VFSMetadata infos, StringBuilder sb) {
if (sb.length() > 0)
sb.append(", ");
if (infos != null && StringHelper.containsNonWhitespace(infos.getTitle())) {
sb.append(infos.getTitle());
} else {
sb.append(file.getName());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendToSubject
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
appendToSubject
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean allAttached(Collection<? extends Component> components) {
for (Component component : components) {
if (component.getParent() != this) {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allAttached
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
|
allAttached
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSpacePreference(String preference, String defaultValue)
{
return this.xwiki.getSpacePreference(preference, defaultValue, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpacePreference
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getSpacePreference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserTimeZone(XWikiContext context)
{
String tz = getUserPreference("timezone", context);
// We perform this verification ourselves since TimeZone#getTimeZone(String) with an invalid parameter returns
// GMT and not the system default.
if (!ArrayUtils.contains(TimeZone.getAvailableIDs(), tz)) {
String defaultTz = TimeZone.getDefault().getID();
return getConfiguration().getProperty("xwiki.timezone", defaultTz);
} else {
return tz;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserTimeZone
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
|
getUserTimeZone
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
String getServerID() {
return serverID;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerID
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getServerID
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private final int _decode32Bits() throws IOException {
int ptr = _inputPtr;
if ((ptr + 3) >= _inputEnd) {
return _slow32();
}
final byte[] b = _inputBuffer;
int v = (b[ptr++] << 24) + ((b[ptr++] & 0xFF) << 16)
+ ((b[ptr++] & 0xFF) << 8) + (b[ptr++] & 0xFF);
_inputPtr = ptr;
return v;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _decode32Bits
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_decode32Bits
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static CharSequenceMap toLowercaseMap(Iterator<? extends CharSequence> valuesIter,
int arraySizeHint) {
final CharSequenceMap result = new CharSequenceMap(arraySizeHint);
while (valuesIter.hasNext()) {
final AsciiString lowerCased = HttpHeaderNames.of(valuesIter.next()).toLowerCase();
try {
int index = lowerCased.forEachByte(FIND_COMMA);
if (index != -1) {
int start = 0;
do {
result.add(lowerCased.subSequence(start, index, false).trim(), EMPTY_STRING);
start = index + 1;
} while (start < lowerCased.length() &&
(index = lowerCased.forEachByte(start,
lowerCased.length() - start, FIND_COMMA)) != -1);
result.add(lowerCased.subSequence(start, lowerCased.length(), false).trim(), EMPTY_STRING);
} else {
result.add(lowerCased.trim(), EMPTY_STRING);
}
} catch (Exception e) {
// This is not expect to happen because FIND_COMMA never throws but must be caught
// because of the ByteProcessor interface.
throw new IllegalStateException(e);
}
}
return result;
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2019-16771
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Merge pull request from GHSA-35fr-h7jr-hh86
Motivation:
An `HttpService` can produce a malformed HTTP response when a user
specified a malformed HTTP header values, such as:
ResponseHeaders.of(HttpStatus.OK
"my-header", "foo\r\nbad-header: bar");
Modification:
- Add strict header value validation to `HttpHeadersBase`
- Add strict header name validation to `HttpHeaderNames.of()`, which is
used by `HttpHeadersBase`.
Result:
- It is not possible anymore to send a bad header value which can be
misused for sending additional headers or injecting arbitrary content.
Function: toLowercaseMap
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
Fixed Code:
private static CharSequenceMap toLowercaseMap(Iterator<? extends CharSequence> valuesIter,
int arraySizeHint) {
final CharSequenceMap result = new CharSequenceMap(arraySizeHint);
while (valuesIter.hasNext()) {
final AsciiString lowerCased = AsciiString.of(valuesIter.next()).toLowerCase();
try {
int index = lowerCased.forEachByte(FIND_COMMA);
if (index != -1) {
int start = 0;
do {
result.add(lowerCased.subSequence(start, index, false).trim(), EMPTY_STRING);
start = index + 1;
} while (start < lowerCased.length() &&
(index = lowerCased.forEachByte(start,
lowerCased.length() - start, FIND_COMMA)) != -1);
result.add(lowerCased.subSequence(start, lowerCased.length(), false).trim(), EMPTY_STRING);
} else {
result.add(lowerCased.trim(), EMPTY_STRING);
}
} catch (Exception e) {
// This is not expect to happen because FIND_COMMA never throws but must be caught
// because of the ByteProcessor interface.
throw new IllegalStateException(e);
}
}
return result;
}
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toLowercaseMap
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setSyncAutomatically(Account account, String providerName, boolean sync) {
setSyncAutomaticallyAsUser(account, providerName, sync, UserHandle.getCallingUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSyncAutomatically
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
setSyncAutomatically
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean deletePackageLI(String packageName, UserHandle user,
boolean deleteCodeAndResources, int[] allUserHandles, boolean[] perUserInstalled,
int flags, PackageRemovedInfo outInfo,
boolean writeSettings) {
if (packageName == null) {
Slog.w(TAG, "Attempt to delete null packageName.");
return false;
}
if (DEBUG_REMOVE) Slog.d(TAG, "deletePackageLI: " + packageName + " user " + user);
PackageSetting ps;
boolean dataOnly = false;
int removeUser = -1;
int appId = -1;
synchronized (mPackages) {
ps = mSettings.mPackages.get(packageName);
if (ps == null) {
Slog.w(TAG, "Package named '" + packageName + "' doesn't exist.");
return false;
}
if ((!isSystemApp(ps) || (flags&PackageManager.DELETE_SYSTEM_APP) != 0) && user != null
&& user.getIdentifier() != UserHandle.USER_ALL) {
// The caller is asking that the package only be deleted for a single
// user. To do this, we just mark its uninstalled state and delete
// its data. If this is a system app, we only allow this to happen if
// they have set the special DELETE_SYSTEM_APP which requests different
// semantics than normal for uninstalling system apps.
if (DEBUG_REMOVE) Slog.d(TAG, "Only deleting for single user");
final int userId = user.getIdentifier();
ps.setUserState(userId,
COMPONENT_ENABLED_STATE_DEFAULT,
false, //installed
true, //stopped
true, //notLaunched
false, //hidden
null, null, null,
false, // blockUninstall
ps.readUserState(userId).domainVerificationStatus, 0);
if (!isSystemApp(ps)) {
if (ps.isAnyInstalled(sUserManager.getUserIds())) {
// Other user still have this package installed, so all
// we need to do is clear this user's data and save that
// it is uninstalled.
if (DEBUG_REMOVE) Slog.d(TAG, "Still installed by other users");
removeUser = user.getIdentifier();
appId = ps.appId;
scheduleWritePackageRestrictionsLocked(removeUser);
} else {
// We need to set it back to 'installed' so the uninstall
// broadcasts will be sent correctly.
if (DEBUG_REMOVE) Slog.d(TAG, "Not installed by other users, full delete");
ps.setInstalled(true, user.getIdentifier());
}
} else {
// This is a system app, so we assume that the
// other users still have this package installed, so all
// we need to do is clear this user's data and save that
// it is uninstalled.
if (DEBUG_REMOVE) Slog.d(TAG, "Deleting system app");
removeUser = user.getIdentifier();
appId = ps.appId;
scheduleWritePackageRestrictionsLocked(removeUser);
}
}
}
if (removeUser >= 0) {
// From above, we determined that we are deleting this only
// for a single user. Continue the work here.
if (DEBUG_REMOVE) Slog.d(TAG, "Updating install state for user: " + removeUser);
if (outInfo != null) {
outInfo.removedPackage = packageName;
outInfo.removedAppId = appId;
outInfo.removedUsers = new int[] {removeUser};
}
mInstaller.clearUserData(ps.volumeUuid, packageName, removeUser);
removeKeystoreDataIfNeeded(removeUser, appId);
schedulePackageCleaning(packageName, removeUser, false);
synchronized (mPackages) {
if (clearPackagePreferredActivitiesLPw(packageName, removeUser)) {
scheduleWritePackageRestrictionsLocked(removeUser);
}
resetUserChangesToRuntimePermissionsAndFlagsLPw(ps, removeUser);
}
return true;
}
if (dataOnly) {
// Delete application data first
if (DEBUG_REMOVE) Slog.d(TAG, "Removing package data only");
removePackageDataLI(ps, null, null, outInfo, flags, writeSettings);
return true;
}
boolean ret = false;
if (isSystemApp(ps)) {
if (DEBUG_REMOVE) Slog.d(TAG, "Removing system package:" + ps.name);
// When an updated system application is deleted we delete the existing resources as well and
// fall back to existing code in system partition
ret = deleteSystemPackageLI(ps, allUserHandles, perUserInstalled,
flags, outInfo, writeSettings);
} else {
if (DEBUG_REMOVE) Slog.d(TAG, "Removing non-system package:" + ps.name);
// Kill application pre-emptively especially for apps on sd.
killApplication(packageName, ps.appId, "uninstall pkg");
ret = deleteInstalledPackageLI(ps, deleteCodeAndResources, flags,
allUserHandles, perUserInstalled,
outInfo, writeSettings);
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deletePackageLI
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
deletePackageLI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUserIcon(int userId, Bitmap bitmap) {
checkManageUsersPermission("update users");
long ident = Binder.clearCallingIdentity();
try {
synchronized (mPackagesLock) {
UserInfo info = mUsers.get(userId);
if (info == null || info.partial) {
Slog.w(LOG_TAG, "setUserIcon: unknown user #" + userId);
return;
}
writeBitmapLocked(info, bitmap);
writeUserLocked(info);
}
sendUserInfoChangedBroadcast(userId);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserIcon
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
setUserIcon
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deactivate() {
SolrServerFactory.shutdown(solrServer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deactivate
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
deactivate
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDefaultDialerApplication(@NonNull String packageName) {
throwIfParentInstance("setDefaultDialerApplication");
if (mService != null) {
try {
mService.setDefaultDialerApplication(packageName);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultDialerApplication
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
|
setDefaultDialerApplication
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int numOfConjectural(int nodeTypeValue) throws IOException {
StringBuilder sql = new StringBuilder();
List<Object> condition = new ArrayList<>(5);
sql.append("select count(*) num from ").append(ServiceTraffic.INDEX_NAME).append(" where ");
sql.append(ServiceTraffic.NODE_TYPE).append("=?");
condition.add(nodeTypeValue);
return getNum(sql, condition);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: numOfConjectural
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
Repository: apache/skywalking
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-13921
|
HIGH
| 7.5
|
apache/skywalking
|
numOfConjectural
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
|
ddb6d9a5019a9c1fe31c364485a4e4b5066fefc3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updatePersistentConfiguration(Configuration values) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
values.writeToParcel(data, 0);
mRemote.transact(UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePersistentConfiguration
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
updatePersistentConfiguration
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void transformTranslate(Object nativeTransform, float x, float y, float z) {
//((Matrix) nativeTransform).preTranslate(x, y);
((CN1Matrix4f)nativeTransform).translate(x, y, z);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transformTranslate
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
|
transformTranslate
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Properties getMessages(String baseBundlename, Locale locale) throws IOException {
Properties m = new Properties();
InputStream in = classLoader.getResourceAsStream(THEME_RESOURCES_MESSAGES + baseBundlename + "_" + locale.toString() + ".properties");
if(in != null){
Charset encoding = PropertiesUtil.detectEncoding(in);
// detectEncoding closes the stream
try (Reader reader = new InputStreamReader(
classLoader.getResourceAsStream(THEME_RESOURCES_MESSAGES + baseBundlename + "_" + locale.toString() + ".properties"), encoding)) {
m.load(reader);
}
}
return m;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessages
File: services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
getMessages
|
services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSafeMode(boolean safeMode) {
mSafeMode = safeMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSafeMode
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
setSafeMode
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] getURLContentAsBytes(String surl, String username, String password, int timeout, String userAgent)
throws IOException
{
HttpClient client = getHttpClient(timeout, userAgent);
// pass our credentials to HttpClient, they will only be used for
// authenticating to servers with realm "realm", to authenticate agains
// an arbitrary realm change this to null.
client.getState().setCredentials(new AuthScope(null, -1, null),
new UsernamePasswordCredentials(username, password));
// create a GET method that reads a file over HTTPS, we're assuming
// that this file requires basic authentication using the realm above.
GetMethod get = new GetMethod(surl);
try {
// Tell the GET method to automatically handle authentication. The
// method will use any appropriate credentials to handle basic
// authentication requests. Setting this value to false will cause
// any request for authentication to return with a status of 401.
// It will then be up to the client to handle the authentication.
get.setDoAuthentication(true);
// execute the GET
client.executeMethod(get);
// print the status and response
return get.getResponseBody();
} finally {
// release any connection resources used by the method
get.releaseConnection();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLContentAsBytes
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
|
getURLContentAsBytes
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPasswordMinimumLetters(ComponentName who, int length, boolean parent) {
if (!mHasFeature || notSupportedOnAutomotive("setPasswordMinimumLetters")) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final int userId = mInjector.userHandleGetCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
ensureMinimumQuality(userId, ap, PASSWORD_QUALITY_COMPLEX, "setPasswordMinimumLetters");
final PasswordPolicy passwordPolicy = ap.mPasswordPolicy;
if (passwordPolicy.letters != length) {
passwordPolicy.letters = length;
updatePasswordValidityCheckpointLocked(userId, parent);
saveSettingsLocked(userId);
}
logPasswordQualitySetIfSecurityLogEnabled(who, userId, parent, passwordPolicy);
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_PASSWORD_MINIMUM_LETTERS)
.setAdmin(who)
.setInt(length)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordMinimumLetters
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
|
setPasswordMinimumLetters
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) {
System.out.println("Servlet called");
PrintWriter outWriter = null;
response.setContentType("text/html");
System.out.println("Content type set");
try {
outWriter = response.getWriter();
if (outWriter != null)
System.out.println("Got writer");
outWriter
.println("<html><body><p>Hi and welcome to our very first servlet</p></body></html>");
outWriter.flush();
} catch (Exception e) {
e.printStackTrace();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGet
File: HeatMapServer/src/com/datformers/servlet/LoginServlet.java
Repository: ssn2013/cis450Project
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2015-10020
|
MEDIUM
| 5.2
|
ssn2013/cis450Project
|
doGet
|
HeatMapServer/src/com/datformers/servlet/LoginServlet.java
|
39b495011437a105c7670e17e071f99195b4922e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyPosted(final ManagedServiceInfo info,
final StatusBarNotification sbn, NotificationRankingUpdate rankingUpdate) {
final INotificationListener listener = (INotificationListener)info.service;
StatusBarNotificationHolder sbnHolder = new StatusBarNotificationHolder(sbn);
try {
listener.onNotificationPosted(sbnHolder, rankingUpdate);
} catch (RemoteException ex) {
Log.e(TAG, "unable to notify listener (posted): " + listener, ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyPosted
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
|
notifyPosted
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createNewConnection(final Message message) {
if (!activity.xmppConnectionService.getHttpConnectionManager().checkConnection(message)) {
Toast.makeText(getActivity(), R.string.not_connected_try_again, Toast.LENGTH_SHORT).show();
return;
}
activity.xmppConnectionService.getHttpConnectionManager().createNewDownloadConnection(message, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createNewConnection
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
|
createNewConnection
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Contract(pure = false, value = "null, _ -> fail")
public static void setAccessible(AccessibleObject object, boolean isAccessible) {
OpenAccess.openAccess(object, isAccessible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccessible
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
setAccessible
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean startUserInBackground(final int userId) {
return startUserInBackgroundWithListener(userId, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startUserInBackground
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
|
startUserInBackground
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getUserIdToWipeForFailedPasswords(ActiveAdmin admin) {
final int userId = admin.getUserHandle().getIdentifier();
final ComponentName component = admin.info.getComponent();
return isProfileOwnerOfOrganizationOwnedDevice(component, userId)
? getProfileParentId(userId) : userId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserIdToWipeForFailedPasswords
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
|
getUserIdToWipeForFailedPasswords
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Map<String, Object>> findEntry(String sql, Object... paras) {
List<Log> logList = find(sql, paras);
List<Map<String, Object>> convertList = new ArrayList<>();
for (Log log : logList) {
convertList.add(log.getAttrs());
}
return convertList;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2018-17420
- Severity: MEDIUM
- CVSS Score: 6.5
Description: fix #37 admin search article has sql injection
Function: findEntry
File: data/src/main/java/com/zrlog/model/Log.java
Repository: 94fzb/zrlog
Fixed Code:
private List<Map<String, Object>> findEntry(String sql, Object[] paras) {
List<Log> logList = find(sql, paras);
List<Map<String, Object>> convertList = new ArrayList<>();
for (Log log : logList) {
convertList.add(log.getAttrs());
}
return convertList;
}
|
[
"CWE-89"
] |
CVE-2018-17420
|
MEDIUM
| 6.5
|
94fzb/zrlog
|
findEntry
|
data/src/main/java/com/zrlog/model/Log.java
|
157b8fbbb64eb22ddb52e7c5754e88180b7c3d4f
| 1
|
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/openapi3/client/petstore/java/jersey2-java8/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/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private XMLReader createTextConverter() throws SAXException {
if (textConverterRef == null) {
throw new ProcessException(
"No text converter has been assigned to the parser but parsers of type '" + type + "' require one");
}
// Load the latest TextConverter to get round the issue of the pipeline
// being cached and therefore holding onto stale TextConverter.
// TODO: We need to use the cached TextConverter service ideally but
// before we do it needs to be aware cluster wide when TextConverter has
// been updated.
final TextConverter tc = textConverterService.loadByUuid(textConverterRef.getUuid());
if (tc == null) {
throw new ProcessException(
"TextConverter \"" + textConverterRef.getName() + "\" appears to have been deleted");
}
// If we are in stepping mode and have made code changes then we want to
// add them to the newly loaded text converter.
if (injectedCode != null) {
tc.setData(injectedCode);
usePool = false;
}
/// Get a text converter generated parser from the pool.
poolItem = parserFactoryPool.borrowObject(tc, usePool);
final StoredParserFactory storedParserFactory = poolItem.getValue();
final StoredErrorReceiver storedErrorReceiver = storedParserFactory.getErrorReceiver();
final ParserFactory parserFactory = storedParserFactory.getParserFactory();
if (storedErrorReceiver.getTotalErrors() == 0 && parserFactory != null) {
return parserFactory.getParser();
} else {
storedErrorReceiver.replay(new ErrorReceiverIdDecorator(getElementId(), getErrorReceiverProxy()));
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTextConverter
File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/CombinedParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
createTextConverter
|
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/CombinedParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
@WorkerThread
public @NonNull Bundle getApplicationRestrictions(
@Nullable ComponentName admin, String packageName) {
throwIfParentInstance("getApplicationRestrictions");
if (mService != null) {
try {
return mService.getApplicationRestrictions(admin, mContext.getPackageName(),
packageName);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationRestrictions
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
|
getApplicationRestrictions
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleNewUserCreated(UserInfo user, @Nullable Object token) {
if (VERBOSE_LOG) {
Slogf.v(LOG_TAG, "handleNewUserCreated(): user=" + user.toFullString()
+ ", token=" + token);
}
final int userId = user.id;
if (isPolicyEngineForFinanceFlagEnabled() || isPermissionCheckFlagEnabled()) {
mDevicePolicyEngine.handleUserCreated(user);
}
if (token != null) {
synchronized (getLockObject()) {
if (mPendingUserCreatedCallbackTokens.contains(token)) {
// Ignore because it was triggered by createAndManageUser()
Slogf.d(LOG_TAG, "handleNewUserCreated(): ignoring for user " + userId
+ " due to token " + token);
mPendingUserCreatedCallbackTokens.remove(token);
return;
}
}
}
if (!mOwners.hasDeviceOwner() || !user.isFull() || user.isManagedProfile()
|| user.isGuest()) {
return;
}
if (mInjector.userManagerIsHeadlessSystemUserMode()) {
ComponentName admin = mOwners.getDeviceOwnerComponent();
Slogf.i(LOG_TAG, "Automatically setting profile owner (" + admin + ") on new user "
+ userId);
manageUserUnchecked(/* deviceOwner= */ admin, /* profileOwner= */ admin,
/* managedUser= */ userId, /* adminExtras= */ null, /* showDisclaimer= */ true);
} else {
Slogf.i(LOG_TAG, "User %d added on DO mode; setting ShowNewUserDisclaimer", userId);
setShowNewUserDisclaimer(userId, DevicePolicyData.NEW_USER_DISCLAIMER_NEEDED);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleNewUserCreated
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
handleNewUserCreated
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected List<String> internalGetPartitionedTopicList() {
validateAdminAccessForTenant(namespaceName.getTenant());
validateNamespaceOperation(namespaceName, NamespaceOperation.GET_TOPICS);
// Validate that namespace exists, throws 404 if it doesn't exist
try {
if (!namespaceResources().exists(path(POLICIES, namespaceName.toString()))) {
log.warn("[{}] Failed to get partitioned topic list {}: Namespace does not exist", clientAppId(),
namespaceName);
throw new RestException(Status.NOT_FOUND, "Namespace does not exist");
}
} catch (RestException e) {
throw e;
} catch (Exception e) {
log.error("[{}] Failed to get partitioned topic list for namespace {}", clientAppId(), namespaceName, e);
throw new RestException(e);
}
return getPartitionedTopicList(TopicDomain.getEnum(domain()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetPartitionedTopicList
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalGetPartitionedTopicList
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDescription() {
return description.getExpressionString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/HipchatNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getDescription
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/HipchatNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setOauthCredentials(String clientId, String clientSecret) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging());
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthCredentials
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
|
setOauthCredentials
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public Document getDocument(String documentReference) throws XWikiException
{
DocumentReference reference;
// We ignore the passed full name if it's null to be backward compatible with previous behaviors.
if (documentReference != null) {
// Note: We use the CurrentMixed Resolver since we want to use the default page name if the page isn't
// specified in the passed string, rather than use the current document's page name.
reference = getCurrentMixedDocumentReferenceResolver().resolve(documentReference);
} else {
reference = getDefaultDocumentReferenceResolver().resolve("");
}
return getDocument(reference);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void bindArgs(@NonNull SQLiteStatement st, @Nullable Object[] bindArgs) {
if (bindArgs == null) return;
for (int i = 0; i < bindArgs.length; i++) {
final Object bindArg = bindArgs[i];
switch (getTypeOfObject(bindArg)) {
case Cursor.FIELD_TYPE_NULL:
st.bindNull(i + 1);
break;
case Cursor.FIELD_TYPE_INTEGER:
st.bindLong(i + 1, ((Number) bindArg).longValue());
break;
case Cursor.FIELD_TYPE_FLOAT:
st.bindDouble(i + 1, ((Number) bindArg).doubleValue());
break;
case Cursor.FIELD_TYPE_BLOB:
st.bindBlob(i + 1, (byte[]) bindArg);
break;
case Cursor.FIELD_TYPE_STRING:
default:
if (bindArg instanceof Boolean) {
// Provide compatibility with legacy
// applications which may pass Boolean values in
// bind args.
st.bindLong(i + 1, ((Boolean) bindArg).booleanValue() ? 1 : 0);
} else {
st.bindString(i + 1, bindArg.toString());
}
break;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindArgs
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
bindArgs
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void updateVisibilities() {
updateAlarmVisibilities();
mEmergencyOnly.setVisibility(mExpanded && mShowEmergencyCallsOnly
? View.VISIBLE : View.INVISIBLE);
mSettingsContainer.setVisibility(mExpanded ? View.VISIBLE : View.INVISIBLE);
mSettingsContainer.findViewById(R.id.tuner_icon).setVisibility(
TunerService.isTunerEnabled(mContext) ? View.VISIBLE : View.INVISIBLE);
mMultiUserSwitch.setVisibility(mExpanded && mMultiUserSwitch.hasMultipleUsers()
? View.VISIBLE : View.INVISIBLE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateVisibilities
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3886
|
HIGH
| 7.2
|
android
|
updateVisibilities
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
|
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
| 0
|
Analyze the following code function for security vulnerabilities
|
List<String> getShellArgsList()
{
return shellArgs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShellArgsList
File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Repository: apache/maven-shared-utils
The code follows secure coding practices.
|
[
"CWE-116"
] |
CVE-2022-29599
|
HIGH
| 7.5
|
apache/maven-shared-utils
|
getShellArgsList
|
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
|
2735facbbbc2e13546328cb02dbb401b3776eea3
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean canComment(Profile authUser, HttpServletRequest req) {
return isAuthenticated(req) && ((authUser.hasBadge(ENTHUSIAST) || CONF.newUsersCanComment() || isMod(authUser)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canComment
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
canComment
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected FrameHeaderData parseFrame(ByteBuffer data) throws IOException {
if (prefaceCount < PREFACE_BYTES.length) {
while (data.hasRemaining() && prefaceCount < PREFACE_BYTES.length) {
if (data.get() != PREFACE_BYTES[prefaceCount]) {
IoUtils.safeClose(getUnderlyingConnection());
throw UndertowMessages.MESSAGES.incorrectHttp2Preface();
}
prefaceCount++;
}
}
Http2FrameHeaderParser frameParser = this.frameParser;
if (frameParser == null) {
this.frameParser = frameParser = new Http2FrameHeaderParser(this, continuationParser);
this.continuationParser = null;
}
if (!frameParser.handle(data)) {
return null;
}
if (!initialSettingsReceived) {
if (frameParser.type != FRAME_TYPE_SETTINGS) {
UndertowLogger.REQUEST_IO_LOGGER.remoteEndpointFailedToSendInitialSettings(frameParser.type);
//StringBuilder sb = new StringBuilder();
//while (data.hasRemaining()) {
// sb.append((char)data.get());
// sb.append(" ");
//}
markReadsBroken(new IOException());
} else {
initialSettingsReceived = true;
}
}
this.frameParser = null;
if (frameParser.getActualLength() > receiveMaxFrameSize && frameParser.getActualLength() > unackedReceiveMaxFrameSize) {
sendGoAway(ERROR_FRAME_SIZE_ERROR);
throw UndertowMessages.MESSAGES.http2FrameTooLarge();
}
if (frameParser.getContinuationParser() != null) {
this.continuationParser = frameParser.getContinuationParser();
return null;
}
return frameParser;
}
|
Vulnerability Classification:
- CWE: CWE-214
- CVE: CVE-2021-3859
- Severity: HIGH
- CVSS Score: 7.5
Description: [UNDERTOW-1979] CVE-2021-3859 continuation frames are not read correctly
Function: parseFrame
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
Fixed Code:
@Override
protected FrameHeaderData parseFrame(ByteBuffer data) throws IOException {
Http2FrameHeaderParser frameParser;
do {
frameParser = parseFrameNoContinuation(data);
// if the frame requires continuation and there is remaining data in the buffer
// it should be consumed cos spec ensures the next frame is the continuation
} while(frameParser != null && frameParser.getContinuationParser() != null && data.hasRemaining());
return frameParser;
}
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
parseFrame
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getBlockUninstallForUser(String packageName, int userId) {
synchronized (mPackages) {
PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps == null) {
Log.i(TAG, "Package doesn't exist in get block uninstall " + packageName);
return false;
}
return ps.getBlockUninstall(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBlockUninstallForUser
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getBlockUninstallForUser
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getVersion()
{
return this.xwiki.getVersion();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getVersion
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateSaeAutoUpgradeFlagForUserSelectNetwork(int networkId) {
if (SdkLevel.isAtLeastS()) return;
if (mWifiGlobals.isWpa3SaeUpgradeEnabled()) return;
WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(networkId);
if (null == config) return;
SecurityParams params = config.getSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
if (null == params || !params.isAddedByAutoUpgrade()) return;
if (!mScanRequestProxy.isWpa3PersonalOnlyNetworkInRange(config.SSID)) return;
if (mScanRequestProxy.isWpa2PersonalOnlyNetworkInRange(config.SSID)) return;
if (mScanRequestProxy.isWpa2Wpa3PersonalTransitionNetworkInRange(config.SSID)) return;
logd("update auto-upgrade flag for SAE");
mWifiConfigManager.updateIsAddedByAutoUpgradeFlag(
config.networkId, WifiConfiguration.SECURITY_TYPE_SAE, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSaeAutoUpgradeFlagForUserSelectNetwork
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
|
updateSaeAutoUpgradeFlagForUserSelectNetwork
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean convertToTranslucent(IBinder token, ActivityOptions options) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToTranslucent
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
convertToTranslucent
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getPublicSharingCondition( String access )
{
return String.join( " or ",
jsonbFunction( EXTRACT_PATH_TEXT, "public" ) + " like " + withQuotes( access ),
jsonbFunction( EXTRACT_PATH_TEXT, "public" ) + " is null" );
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-24848
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-52vp-f7hj-cj92
* fix: Add validation for programs org unit associations [DHIS2-13056]
* fix compilation failure in test class
* Fix one more compilation failure in another test class
Co-authored-by: Lars Helge Øverland <lars@dhis2.org>
Co-authored-by: Ameen <ameen@dhis2.org>
Function: getPublicSharingCondition
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
Fixed Code:
private String getPublicSharingCondition( String access )
{
return String.join( " or ",
jsonbFunction( EXTRACT_PATH_TEXT, "public" ) + " like " + singleQuote( access ),
jsonbFunction( EXTRACT_PATH_TEXT, "public" ) + " is null" );
}
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getPublicSharingCondition
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean verifyHttpsHost() {
return verifyHttpsHost;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyHttpsHost
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
verifyHttpsHost
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void write(char[] chars, int offset, int length) {
builder.append(chars, offset, length);
tryFlush();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
write
|
web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRelPath() {
Path bFile = getBasefile().toPath();
Path bcRoot = FolderConfig.getCanonicalRootPath();
String relPath;
if(bFile.startsWith(bcRoot)) {
relPath = bcRoot.relativize(bFile).toString();
if(relPath.endsWith("/")) {
relPath = relPath.substring(0, relPath.length() - 1);
}
if(!relPath.startsWith("/")) {
relPath = "/".concat(relPath);
}
} else {
relPath = null;
}
return relPath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelPath
File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getRelPath
|
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
|
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void scheduleApplicationInfoChanged(List<String> packageNames, int userId) {
enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
"scheduleApplicationInfoChanged()");
final long origId = Binder.clearCallingIdentity();
try {
final boolean updateFrameworkRes = packageNames.contains("android");
synchronized (mProcLock) {
updateApplicationInfoLOSP(packageNames, updateFrameworkRes, userId);
}
AppWidgetManagerInternal widgets = LocalServices.getService(
AppWidgetManagerInternal.class);
if (widgets != null) {
widgets.applyResourceOverlaysToWidgets(new HashSet<>(packageNames), userId,
updateFrameworkRes);
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleApplicationInfoChanged
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
scheduleApplicationInfoChanged
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getSingleValidRedirectUri(Collection<String> validRedirects) {
if (validRedirects.size() != 1) return null;
String validRedirect = validRedirects.iterator().next();
return validateRedirectUriWildcard(validRedirect);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSingleValidRedirectUri
File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4361
|
MEDIUM
| 6.1
|
keycloak
|
getSingleValidRedirectUri
|
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
|
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMinPushSize() {
return minPushSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMinPushSize
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
getMinPushSize
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
private short toShort(K name, V value) {
try {
return valueConverter.convertToShort(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Failed to convert header value to short for header '" + name + '\'');
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toShort
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
toShort
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearTemplateCache() {
webConfiguration.clearTemplateCache();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearTemplateCache
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-20914
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
clearTemplateCache
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
|
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doStart() {
dnsClient = new DnsClient(config.requestTimeout());
dnsClient.start(config.serverIps());
}
|
Vulnerability Classification:
- CWE: CWE-345
- CVE: CVE-2023-41045
- Severity: MEDIUM
- CVSS Score: 5.3
Description: Merge pull request from GHSA-g96c-x7rh-99r3
* Add support for randomizing DNS Lookup source port
* Clarify purpose of lease
* Skip initial refresh
Previously, the pool was being refreshed immediately upon initialization. Now, the refresh waits until the `poolRefreshSeconds` duration has elapsed.
* Ensure thread safety, skip unused poller refreshes
* Add change log
* Restore location of local flag
Function: doStart
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
Fixed Code:
@Override
protected void doStart() {
dnsClient = new DnsClient(config.requestTimeout(), adapterConfiguration.getPoolSize(),
adapterConfiguration.getPoolRefreshInterval().toSeconds());
dnsClient.start(config.serverIps());
}
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
doStart
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
a101f4f12180fd3dfa7d3345188a099877a3c327
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
req.bindJSON(this,json);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configure
File: core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2014-9634
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
configure
|
core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java
|
582128b9ac179a788d43c1478be8a5224dc19710
| 0
|
Analyze the following code function for security vulnerabilities
|
void connectComet(OortComet comet) {
connectComet(comet, newOortHandshakeFields(comet.getURL(), null));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connectComet
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
|
connectComet
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public void toggleFullscreenModeForTab(boolean enterFullscreen) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toggleFullscreenModeForTab
File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
toggleFullscreenModeForTab
|
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleDump(IndentingPrintWriter pw) {
if (mNetworkLoggingNotificationUserId != UserHandle.USER_NULL) {
pw.println("mNetworkLoggingNotificationUserId: " + mNetworkLoggingNotificationUserId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleDump
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
|
handleDump
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int removeMonitor(String monitorId) {
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeMonitor
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
removeMonitor
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
public SSHClient getConnectedClient(Config config) throws IOException {
SSHClient sshClient = new SSHClient(config);
sshClient.addHostKeyVerifier(new PromiscuousVerifier());
sshClient.connect("127.0.0.1", getFirstMappedPort());
return sshClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectedClient
File: src/itest/java/com/hierynomus/sshj/SshdContainer.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getConnectedClient
|
src/itest/java/com/hierynomus/sshj/SshdContainer.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setServerIndex(Integer serverIndex) {
this.serverIndex = serverIndex;
updateBasePath();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerIndex
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
setServerIndex
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private SecretKey buildPasswordKey(String algorithm, String pw, byte[] salt, int rounds) {
return buildCharArrayKey(algorithm, pw.toCharArray(), salt, rounds);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildPasswordKey
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
buildPasswordKey
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void handleWatchFileResult(
CompletableFuture<com.linecorp.centraldogma.common.Entry<Object>> future,
AsyncMethodCallback resultHandler) {
future.handle((res, cause) -> {
if (cause == null) {
final WatchFileResult wfr = new WatchFileResult();
wfr.setRevision(convert(res.revision()));
wfr.setType(convert(res.type()));
wfr.setContent(res.contentAsText());
resultHandler.onComplete(wfr);
} else if (cause instanceof CancellationException) {
resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_FILE_RESULT);
} else if (cause instanceof RequestAlreadyTimedOutException) {
logger.warn("Ignoring the exception raised when a request has already timed out.");
} else {
logAndInvokeOnError("watchFile", resultHandler, cause);
}
return null;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleWatchFileResult
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
handleWatchFileResult
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Get("/projects/{projectName}/repos/{repoName}/compare")
public CompletableFuture<?> getDiff(
@Param @Default("/**") String pathPattern,
@Param @Default("1") String from, @Param @Default("head") String to,
Repository repository,
@RequestConverter(QueryRequestConverter.class) @Nullable Query<?> query) {
if (query != null) {
return repository.diff(new Revision(from), new Revision(to), query)
.thenApply(DtoConverter::convert);
} else {
return repository
.diff(new Revision(from), new Revision(to), normalizePath(pathPattern))
.thenApply(changeMap -> changeMap.values().stream()
.map(DtoConverter::convert).collect(toImmutableList()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDiff
File: server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
getDiff
|
server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
|
6a395aed73f0b009cf8174a3ebf3ed826521c11d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveTaskToStack(int taskId, int stackId, boolean toTop) {
enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
"moveTaskToStack()");
if (stackId == HOME_STACK_ID) {
Slog.e(TAG, "moveTaskToStack: Attempt to move task " + taskId + " to home stack",
new RuntimeException("here").fillInStackTrace());
}
synchronized (this) {
long ident = Binder.clearCallingIdentity();
try {
if (DEBUG_STACK) Slog.d(TAG, "moveTaskToStack: moving task=" + taskId + " to stackId="
+ stackId + " toTop=" + toTop);
mStackSupervisor.moveTaskToStackLocked(taskId, stackId, toTop);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToStack
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
|
moveTaskToStack
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] compress(byte[] input) {
if (input.length == 0) {
return new byte[0];
}
int len = Math.max(input.length / 10, 10);
Deflater compressor = new Deflater();
compressor.setLevel(Deflater.BEST_SPEED);
compressor.setInput(input);
compressor.finish();
ByteArrayOutputStream bos = new ByteArrayOutputStream(len);
byte[] buf = new byte[len];
while (!compressor.finished()) {
int count = compressor.deflate(buf);
bos.write(buf, 0, count);
}
compressor.end();
return bos.toByteArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compress
File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
compress
|
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Endpoint getUserInfoOIDCEndpoint() throws URISyntaxException
{
return getEndPoint(UserInfoOIDCEndpoint.HINT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserInfoOIDCEndpoint
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
getUserInfoOIDCEndpoint
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressLint("InflateParams")
protected void showJoinConferenceDialog(final String prefilledJid) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG);
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
JoinConferenceDialog joinConferenceFragment = JoinConferenceDialog.newInstance(prefilledJid, mActivatedAccounts);
joinConferenceFragment.show(ft, FRAGMENT_TAG_DIALOG);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showJoinConferenceDialog
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
showJoinConferenceDialog
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setDialogParamsAsBottomSheet() {
final Window window = mDialog.getWindow();
window.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
| WindowManager.LayoutParams.FLAG_DIM_BEHIND);
window.setDimAmount(0.6f);
window.addPrivateFlags(WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS);
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
window.setGravity(Gravity.BOTTOM | Gravity.CENTER);
window.setCloseOnTouchOutside(true);
final WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT;
params.accessibilityTitle =
mContext.getString(R.string.autofill_picker_accessibility_title);
params.windowAnimations = R.style.AutofillSaveAnimation;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDialogParamsAsBottomSheet
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
setDialogParamsAsBottomSheet
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setRightButton(IntentButton button) {
mRightButton = button;
updateRightAffordanceIcon();
updateCameraVisibility();
inflateCameraPreview();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRightButton
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
|
setRightButton
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Uri insert(Uri arg0, ContentValues arg1) {
// TODO Auto-generated method stub
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insert
File: src/at/hgz/vocabletrainer/VocableTrainerProvider.java
Repository: hgzojer/vocabletrainer
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2017-20181
|
MEDIUM
| 4.3
|
hgzojer/vocabletrainer
|
insert
|
src/at/hgz/vocabletrainer/VocableTrainerProvider.java
|
accf6838078f8eb105cfc7865aba5c705fb68426
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void
setUrl(ThreadContext context, InputSource source, IRubyObject url)
{
String path = rubyStringToString(url);
// Dir.chdir might be called at some point before this.
if (path != null) {
try {
URI uri = URI.create(path);
source.setSystemId(uri.toURL().toString());
} catch (Exception ex) {
// fallback to the old behavior
File file = new File(path);
if (file.isAbsolute()) {
source.setSystemId(path);
} else {
String pwd = context.getRuntime().getCurrentDirectory();
String absolutePath;
try {
absolutePath = new File(pwd, path).getCanonicalPath();
} catch (IOException e) {
absolutePath = new File(pwd, path).getAbsolutePath();
}
source.setSystemId(absolutePath);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUrl
File: ext/java/nokogiri/internals/ParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
setUrl
|
ext/java/nokogiri/internals/ParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Throwing.Consumer<? super Object> bindService(Logger log,
final Set<Object> src,
final Config conf,
final Env env,
final RouteMetadata rm,
final Binder binder,
final Multibinder<Route.Definition> definitions,
final Multibinder<WebSocket.Definition> sockets,
final Multibinder<Err.Handler> ehandlers,
final Multibinder<Parser> parsers,
final Multibinder<Renderer> renderers,
final Set<Object> routeClasses,
final boolean caseSensitiveRouting) {
return it -> {
if (it instanceof Jooby.Module) {
int from = src.size();
install(log, (Jooby.Module) it, env, conf, binder);
int to = src.size();
// collect any route a module might add
if (to > from) {
List<Object> elements = normalize(new ArrayList<>(src).subList(from, to), env, rm,
caseSensitiveRouting);
for (Object e : elements) {
bindService(log, src,
conf,
env,
rm,
binder,
definitions,
sockets,
ehandlers,
parsers,
renderers,
routeClasses, caseSensitiveRouting).accept(e);
}
}
} else if (it instanceof Route.Definition) {
Route.Definition rdef = (Definition) it;
Route.Filter h = rdef.filter();
if (h instanceof Route.MethodHandler) {
Class<?> routeClass = ((Route.MethodHandler) h).implementingClass();
if (routeClasses.add(routeClass)) {
binder.bind(routeClass);
}
definitions.addBinding().toInstance(rdef);
} else {
definitions.addBinding().toInstance(rdef);
}
} else if (it instanceof WebSocket.Definition) {
sockets.addBinding().toInstance((WebSocket.Definition) it);
} else if (it instanceof Parser) {
parsers.addBinding().toInstance((Parser) it);
} else if (it instanceof Renderer) {
renderers.addBinding().toInstance((Renderer) it);
} else {
ehandlers.addBinding().toInstance((Err.Handler) it);
}
};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindService
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
bindService
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isResizeable() {
return isResizeable(/* checkPictureInPictureSupport */ true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isResizeable
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
|
isResizeable
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initializeMandatoryDocument(MandatoryDocumentInitializer initializer, XWikiContext context)
{
try {
DocumentReference documentReference =
getCurrentReferenceDocumentReferenceResolver().resolve(initializer.getDocumentReference());
if (documentReference.getWikiReference().getName().equals(context.getWikiId())) {
XWikiDocument document = context.getWiki().getDocument(documentReference, context);
if (initializer.updateDocument(document)) {
saveDocument(document,
localizePlainOrKey("core.model.xclass.mandatoryUpdateProperty.versionSummary"), context);
}
}
} catch (XWikiException e) {
LOGGER.error("Failed to initialize mandatory document [{}]", initializer.getDocumentReference(), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeMandatoryDocument
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
|
initializeMandatoryDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUrlDirectionListener(UrlDirectionListener listener) {
mUrlDirectionListener = listener;
if (mUrlDirectionListener != null) {
mUrlDirectionListener.onUrlDirectionChanged(mUrlDirection);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUrlDirectionListener
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
|
setUrlDirectionListener
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@SuppressWarnings("unchecked")
protected String getInternalIdForColumn(Column<?, ?> column) {
return getGrid().getInternalIdForColumn((Column<T, ?>) column);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInternalIdForColumn
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
|
getInternalIdForColumn
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private String processAction(String action) {
RequestDataValueProcessor processor = getRequestContext().getRequestDataValueProcessor();
ServletRequest request = this.pageContext.getRequest();
if ((processor != null) && (request instanceof HttpServletRequest)) {
action = processor.processAction((HttpServletRequest) request, action, getHttpMethod());
}
return action;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processAction
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
processAction
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
private Collection<WifiConfiguration> getInternalConfiguredNetworks() {
return mConfiguredNetworks.valuesForCurrentUser();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInternalConfiguredNetworks
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
|
getInternalConfiguredNetworks
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final int startActivityAsCaller(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, boolean ignoreTargetSecurity,
int userId) {
// This is very dangerous -- it allows you to perform a start activity (including
// permission grants) as any app that may launch one of your own activities. So
// we will only allow this to be done from activities that are part of the core framework,
// and then only when they are running as the system.
final ActivityRecord sourceRecord;
final int targetUid;
final String targetPackage;
synchronized (this) {
if (resultTo == null) {
throw new SecurityException("Must be called from an activity");
}
sourceRecord = mStackSupervisor.isInAnyStackLocked(resultTo);
if (sourceRecord == null) {
throw new SecurityException("Called with bad activity token: " + resultTo);
}
if (!sourceRecord.info.packageName.equals("android")) {
throw new SecurityException(
"Must be called from an activity that is declared in the android package");
}
if (sourceRecord.app == null) {
throw new SecurityException("Called without a process attached to activity");
}
if (UserHandle.getAppId(sourceRecord.app.uid) != Process.SYSTEM_UID) {
// This is still okay, as long as this activity is running under the
// uid of the original calling activity.
if (sourceRecord.app.uid != sourceRecord.launchedFromUid) {
throw new SecurityException(
"Calling activity in uid " + sourceRecord.app.uid
+ " must be system uid or original calling uid "
+ sourceRecord.launchedFromUid);
}
}
if (ignoreTargetSecurity) {
if (intent.getComponent() == null) {
throw new SecurityException(
"Component must be specified with ignoreTargetSecurity");
}
if (intent.getSelector() != null) {
throw new SecurityException(
"Selector not allowed with ignoreTargetSecurity");
}
}
targetUid = sourceRecord.launchedFromUid;
targetPackage = sourceRecord.launchedFromPackage;
}
if (userId == UserHandle.USER_NULL) {
userId = UserHandle.getUserId(sourceRecord.app.uid);
}
// TODO: Switch to user app stacks here.
try {
int ret = mActivityStarter.startActivityMayWait(null, targetUid, targetPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags, null,
null, null, bOptions, ignoreTargetSecurity, userId, null, null);
return ret;
} catch (SecurityException e) {
// XXX need to figure out how to propagate to original app.
// A SecurityException here is generally actually a fault of the original
// calling activity (such as a fairly granting permissions), so propagate it
// back to them.
/*
StringBuilder msg = new StringBuilder();
msg.append("While launching");
msg.append(intent.toString());
msg.append(": ");
msg.append(e.getMessage());
*/
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAsCaller
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
|
startActivityAsCaller
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void submitForm() {
ApplicationContext ac = AppUtil.getApplicationContext();
WorkflowUserManager workflowUserManager = (WorkflowUserManager) ac.getBean("workflowUserManager");
UserDao userDao = (UserDao) ac.getBean("userDao");
User userObject = userDao.getUser(workflowUserManager.getCurrentUsername());
User currentUser = null;
if (userObject != null) {
currentUser = new User();
BeanUtils.copyProperties(userObject, currentUser);
}
ExtDirectoryManager directoryManager = (ExtDirectoryManager) AppUtil.getApplicationContext().getBean("directoryManager");
Collection<String> errors = new ArrayList<String>();
Collection<String> passwordErrors = new ArrayList<String>();
boolean authenticated = false;
if (currentUser != null) {
if (!currentUser.getUsername().equals(getRequestParameterString("username"))) {
HttpServletRequest request = WorkflowUtil.getHttpServletRequest();
if (request != null) {
HttpSession session = request.getSession(false);
if (session != null) {
session.invalidate();
authenticated = false;
}
}
} else {
try {
if (directoryManager.authenticate(currentUser.getUsername(), getRequestParameterString("oldPassword"))) {
authenticated = true;
}
} catch (Exception e) { }
}
}
UserSecurity us = DirectoryUtil.getUserSecurity();
if ("".equals(getPropertyString("f_firstName"))) {
currentUser.setFirstName(getRequestParameterString("firstName"));
}
if ("".equals(getPropertyString("f_lastName"))) {
currentUser.setLastName(getRequestParameterString("lastName"));
}
if ("".equals(getPropertyString("f_email"))) {
currentUser.setEmail(getRequestParameterString("email"));
}
if ("".equals(getPropertyString("f_timeZone"))) {
currentUser.setTimeZone(getRequestParameterString("timeZone"));
}
if ("".equals(getPropertyString("f_locale"))) {
currentUser.setLocale(getRequestParameterString("locale"));
}
if (!authenticated) {
if (errors == null) {
errors = new ArrayList<String>();
}
errors.add(ResourceBundleUtil.getMessage("console.directory.user.error.label.authenticationFailed"));
} else {
if (us != null) {
errors = us.validateUserOnProfileUpdate(currentUser);
}
if (getRequestParameterString("password") != null && !getRequestParameterString("password").isEmpty() && us != null) {
passwordErrors = us.validatePassword(getRequestParameterString("username"), getRequestParameterString("oldPassword"), getRequestParameterString("password"), getRequestParameterString("confirmPassword"));
}
}
setProperty("errors", errors);
if (passwordErrors != null && !passwordErrors.isEmpty()) {
setProperty("passwordErrors", passwordErrors);
}
if (authenticated && (passwordErrors != null && passwordErrors.isEmpty()) && (errors != null && errors.isEmpty())) {
if ("".equals(getPropertyString("f_password"))) {
if (getRequestParameterString("password") != null && getRequestParameterString("confirmPassword") != null && getRequestParameterString("password").length() > 0 && getRequestParameterString("password").equals(getRequestParameterString("confirmPassword"))) {
if (us != null) {
currentUser.setPassword(us.encryptPassword(getRequestParameterString("username"), getRequestParameterString("password")));
} else {
currentUser.setPassword(StringUtil.md5Base16(getRequestParameterString("password")));
}
currentUser.setConfirmPassword(getRequestParameterString("password"));
}
}
if (currentUser.getUsername().equals(getRequestParameterString("username"))) {
userDao.updateUser(currentUser);
if (us != null) {
us.updateUserProfilePostProcessing(currentUser);
}
setAlertMessage(getPropertyString("message"));
setProperty("headerTitle", getPropertyString("label"));
if (getPropertyString("redirectURL") != null && !getPropertyString("redirectURL").isEmpty()) {
setProperty("view", "redirect");
boolean redirectToParent = "Yes".equals(getPropertyString("showInPopupDialog"));
setRedirectUrl(getPropertyString("redirectURL"), redirectToParent);
} else {
setProperty("saved", "true");
viewForm(null);
}
}
} else {
viewForm(currentUser);
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2022-4859
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Fixed: wflow-core - User Profile Menu - Prevent XSS. T1604 @7.0-SNAPSHOT
Function: submitForm
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
Repository: jogetworkflow/jw-community
Fixed Code:
private void submitForm() {
ApplicationContext ac = AppUtil.getApplicationContext();
WorkflowUserManager workflowUserManager = (WorkflowUserManager) ac.getBean("workflowUserManager");
UserDao userDao = (UserDao) ac.getBean("userDao");
User userObject = userDao.getUser(workflowUserManager.getCurrentUsername());
User currentUser = null;
if (userObject != null) {
currentUser = new User();
BeanUtils.copyProperties(userObject, currentUser);
}
ExtDirectoryManager directoryManager = (ExtDirectoryManager) AppUtil.getApplicationContext().getBean("directoryManager");
Collection<String> errors = new ArrayList<String>();
Collection<String> passwordErrors = new ArrayList<String>();
boolean authenticated = false;
if (currentUser != null) {
if (!currentUser.getUsername().equals(getRequestParameterString("username"))) {
HttpServletRequest request = WorkflowUtil.getHttpServletRequest();
if (request != null) {
HttpSession session = request.getSession(false);
if (session != null) {
session.invalidate();
authenticated = false;
}
}
} else {
try {
if (directoryManager.authenticate(currentUser.getUsername(), getRequestParameterString("oldPassword"))) {
authenticated = true;
}
} catch (Exception e) { }
}
}
UserSecurity us = DirectoryUtil.getUserSecurity();
if ("".equals(getPropertyString("f_firstName")) && !StringUtil.stripAllHtmlTag(getRequestParameterString("firstName")).isEmpty()) {
currentUser.setFirstName(StringUtil.stripAllHtmlTag(getRequestParameterString("firstName")));
}
if ("".equals(getPropertyString("f_lastName"))) {
currentUser.setLastName(StringUtil.stripAllHtmlTag(getRequestParameterString("lastName")));
}
if ("".equals(getPropertyString("f_email"))) {
currentUser.setEmail(getRequestParameterString("email"));
}
if ("".equals(getPropertyString("f_timeZone"))) {
currentUser.setTimeZone(getRequestParameterString("timeZone"));
}
if ("".equals(getPropertyString("f_locale"))) {
currentUser.setLocale(getRequestParameterString("locale"));
}
if (!authenticated) {
if (errors == null) {
errors = new ArrayList<String>();
}
errors.add(ResourceBundleUtil.getMessage("console.directory.user.error.label.authenticationFailed"));
} else {
if (us != null) {
errors = us.validateUserOnProfileUpdate(currentUser);
}
if (getRequestParameterString("password") != null && !getRequestParameterString("password").isEmpty() && us != null) {
passwordErrors = us.validatePassword(getRequestParameterString("username"), getRequestParameterString("oldPassword"), getRequestParameterString("password"), getRequestParameterString("confirmPassword"));
}
}
setProperty("errors", errors);
if (passwordErrors != null && !passwordErrors.isEmpty()) {
setProperty("passwordErrors", passwordErrors);
}
if (authenticated && (passwordErrors != null && passwordErrors.isEmpty()) && (errors != null && errors.isEmpty())) {
if ("".equals(getPropertyString("f_password"))) {
if (getRequestParameterString("password") != null && getRequestParameterString("confirmPassword") != null && getRequestParameterString("password").length() > 0 && getRequestParameterString("password").equals(getRequestParameterString("confirmPassword"))) {
if (us != null) {
currentUser.setPassword(us.encryptPassword(getRequestParameterString("username"), getRequestParameterString("password")));
} else {
currentUser.setPassword(StringUtil.md5Base16(getRequestParameterString("password")));
}
currentUser.setConfirmPassword(getRequestParameterString("password"));
}
}
if (currentUser.getUsername().equals(getRequestParameterString("username"))) {
userDao.updateUser(currentUser);
if (us != null) {
us.updateUserProfilePostProcessing(currentUser);
}
setAlertMessage(getPropertyString("message"));
setProperty("headerTitle", getPropertyString("label"));
if (getPropertyString("redirectURL") != null && !getPropertyString("redirectURL").isEmpty()) {
setProperty("view", "redirect");
boolean redirectToParent = "Yes".equals(getPropertyString("showInPopupDialog"));
setRedirectUrl(getPropertyString("redirectURL"), redirectToParent);
} else {
setProperty("saved", "true");
viewForm(null);
}
}
} else {
viewForm(currentUser);
}
}
|
[
"CWE-79"
] |
CVE-2022-4859
|
MEDIUM
| 4
|
jogetworkflow/jw-community
|
submitForm
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
|
9a77f508a2bf8cf661d588f37a4cc29ecaea4fc8
| 1
|
Analyze the following code function for security vulnerabilities
|
public void postCredential(String url, String username, String password, File keyFile, PrintWriter logWriter) throws SVNException, IOException {
postCredential(null,url,username,password,keyFile,logWriter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postCredential
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
postCredential
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.