cookiequiz

pdf

School

New York University *

*We aren’t endorsed by this school

Course

0467

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

9

Uploaded by shayanahmad1412

Report
Previous Page m Page 1 of 1. Question 1 (1 point) Saved Which Set-Cookie option (also called directive) prevents client-side JavaScript (that is, JavaScript run in the browser) from accessing cookies? (@) HttpOnly Q Secure Q SameSite () expires () no such option exists Previous Page m Page 1 of 1 Previous Page m Page 2 of 12 Question 2 (1 point) Saved What is the most appropriate status code for for an http response given back as the result of a POST form submission where refreshing the page does not cause the form to be resubmitted () 100 () 200 () 404 (o) 303 Previous Page m Page 20f 12
Previous Page m Page 3 of 12 Question 3 (1 point) Saved The form element's { action } Ay (all lowercase) attribute determines the path of the http request generated by pressing the form's submit button. Previous Page m Page 3of 12 Submit Quiz 12 of 12 questions saved
Previous Page m Page 4 of 12 Question 4 (1 point) Saved Given the following http request: POST /foo HTTP/1.1 Content-Type: application/x-www—form-urlencoded bar=baz&qux=corge Fill in the blanks for the form markup that generated this request on form submission (not all tags are shown) <form method=" ( post } A, "action=" { foo A/ > <input type="text" name=" [ bar ' A/ "> <!-- filled in with "baz" --> <!-- additional markup not shown --> </form> Previous Page m Page 4 of 12 Submit Quiz 12 of 12 questions saved
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Previous Page m Page 5 of 12 Question 5 (1 point) Saved (true/false) When a browser has valid cookies for a domain, it will send the information in those cookies as the value of the Cookie header when making all future requests to that domain until that cookie is deleted (deleted manually by the user, deleted because of expiration, etc.) ( true W A/ Previous Page m Page 5 of 12 Submit Quiz 12 of 12 questions saved Previous Page m Page 6 of 12 Question 6 (1 point) Saved (true/false) The Cookie header can only contain a single name value pair. ( false | & Previous Page m Page 6 of 12 Submit Quiz 12 of 12 questions saved
Previous Page m Page 7 of 12 Question 7 (1 point) Saved Loading JavaScript from another domain that reads cookies from the domain that the current page is being viewed on is called: (8) XSS () Session Fixation () CSRF C) Third Party Tracking Cookies () Replay Attack Previous Page m Page 7 of 12 Submit Quiz 12 of 12 questions saved Previous Page m Page 8 of 12 Question 8 (1 point) Saved (true/false) When the path and domain options (also called directives) for the Set-Cookie response header are set, the browser only sends those cookies back through the Cookie request header when the browser is making a request to the specified domain and path. ( true W Ay Previous Page m Page 8 of 12 Submit Quiz 12 of 12 questions saved
Question 9 (1 point) Saved Given the following form: <form method="GET" action="/foo"> <input type="text" name="bar"> <input type="text" name="qux"> <input type="submit"> </form> If the form is submitted with baz typed into the first field and corge typed into the second field, the resulting query string is: { /foo?bar=baz&qux=co ] As (type the whole query string) Previous Page m Page 9 of 12 Submit Quiz 12 of 12 questions saved [foo?bar=baz&qux=corge
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 10 (1 point) Saved If a form's method is GET, then the data in the form is transmitted to the server: () In the body of the HTTP request as JSON @ Appended to the path of an HTTP request O In the body of the HTTP request as name and value pairs () Through a cookie () Within the HTTP request headers Previous Page m Page 10 of 12 Submit Quiz 12 of 12 questions saved Question 11 (1 point) Saved If a form at the url, http:/foo.bar/my-form, has the following markup: <form method="POST"> <!=- other markup follows—--> Fill in the blanks for the resulting http request after the form's submit button is pressed (method in all caps, path is case sensitive): ( POST Ay /my-form A, HTTP/1.1 Previous Page m Page 11 of 12 Submit Quiz 12 of 12 questions saved
Question 12 (1 point) Saved Which Set-Cookie option produces a cookie that only be sent to the server over HTTPS using SSL? () HttpOnly @ Secure Q SameSite () expires () no such option exists Previous Page Next Page Page 12 of 12 m 12 of 12 questions saved
Your work has been saved and submitted Written Oct 23, 2023 10:42 AM - Oct 23, 2023 11:06 AM e Attempt 1 of 5 Attempt Score 9.7 /12 -80.83 % Overall Grade (Highest Attempt) 9.7 /12 - 80.83 % Question 4 0.7 / 1 point Given the following http request: POST /foo HTTP/1.1 Content-Type: application/x-www-form-urlencoded bar=baz&gqux=corge Fill in the blanks for the form markup that generated this request on form submission (not all tags are shown) <form method=" ___post __ "action=" ___foo _ "> <input type="text" name=" ___bar___ "> <!--filled in with "baz" --> <!-- additional markup not shown --> </form> Question 8 0/ 1 point (true/false) When the path and domain options (also called directives) for the Set-Cookie response header are set, the browser only sends those cookies back through the Cookie request header when the browser is making a request to the specified domain and path. true Question 9 0/ 1 point Given the following form: <form method="GET" action="/foo"> <input type="text" name="bar"> <input type="text" name="qux"> <input type="submit"> </ form> If the form is submitted with baz typed into the first field and corge typed into the second field, the resulting query string is: /foo?bar=baz&qux=corge (type the whole query string)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help