Question: A developer needs to provide feedback on a peers work during the sdlc. While reviewing the code changes the developer discovers session id tokens for

A developer needs to provide feedback on a peers work during the sdlc. While reviewing the code changes the developer discovers session id tokens for a web application will be transmitted over an unsecure connection. Which of the following code snippet should developer recommend implementing to correct the vulnerability?

  1. Cookie cookie new cookie (primary);

Cookie.secure (true);

  1. String input request.getParameter (input);

String caricature Pattern {./a-aA-Z0-9?m4};

If (: input. Matches (character Pattern)

{

Out.rintin {Invalid Input);

C.

15

D.

value=<%=rsAPI.encoder().encodeForHTML (request.getParameter (sessionPM) ) %>/>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!