-->
Skip to main content

Posts

Solution : Improper Output Neutralization For Logs (CWE ID 117)

Solution: Improper Output Neutralization For Logs (CWE ID 117) Today we will give the solution for Improper Output Neutralization For Logs (CWE ID 117) which is one of the things that Veracode shows to fix the CRLF Injection. Why it Occured as Per Veracode documentation  A function call could result in a log forging attack. Writing untrusted data into a log file allows an attacker to forge log entries or inject malicious content into log files. Corrupted log files can be used to cover an attacker's tracks or as a delivery mechanism for an attack on a log viewing or processing utility. For example, if a web administrator uses a browser-based utility to review logs, a cross-site scripting attack might be possible. Thus if we don't fix this it will allow attackers to inject malicious content into our logs. Recommadation by documentation Avoid directly embedding user input in log files when possible. Sanitize untrusted data used to construct log entries by using a safe logging mec...

Top 33 Hashmap Interview Questions in Java (+ Answers)

Top 33 Hashmap Interview Questions in Java Today we will discuss the Top 33 Hashmap Interview Questions in Java . In the earlier posts,  we had discussed Company-wise interview questions  IRIS Software Interview Questions in Java Kent CamEye Interview Questions in Java Fiserv Interview questions in Java NIIT Interview Questions in Java Let's see the Top 30 Hashmap Interview Questions in Java now...

Convert String Array to int array in java [2021]

Convert String Array to int array in java [2021] In today's programming world, We generally need to Convert String Array to int Array in Java, In this tutorial, we will cover  how to convert String Array to int Array in Java  using two approaches. Using the  Integer.parseInt method  of Integer class. Using the Stream API of Java 8.  Earlier we have covered different conversions like  Convert to String from Byte Array In Java ,  Convert String to Byte Array in Java  and  Convert Between Java Byte Array to Object In Java , Convert String to Array In Java  which is also similar to our current requirement. Let's dive in for our current tutorial... Convert String Array to int Array  1. Using Integer.parseInt method with for loop     We can convert String array to int array simply iterating one element at a time and then parsing that element to int form with the help of Integer.parseInt method.   Example : import java.uti...