Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Flaw detected by Veracode static scan #219

Open
MitekDev-AWood opened this issue Jan 16, 2018 · 0 comments
Open

Flaw detected by Veracode static scan #219

MitekDev-AWood opened this issue Jan 16, 2018 · 0 comments

Comments

@MitekDev-AWood
Copy link

General information

The following flaw is detected by a Veracode static scan:
Severity: Low
Exploitability: Unlikely
Use of Wrong Operator in String Comparison
OverlayView.java: 358
Attack Vector: span.neq

Description: Using '!=' to compare two strings for inequality actually compares the object references rather than their values. It is unlikely that this reflects the intended application logic.

Remediation: Use the equals() method to compare strings, not the '!=' operator.

Issue description

Change OverlayView.java line 353 to:
if (scanInstructions != null && !scanInstructions.equals("")) {
(instead of scanInstructions != "")

I tried pushing the code changes to a separate branch in order to do a PR, but kept getting 403 permission denied errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant