WebFund 2013F: Assignment 2: Difference between revisions
Line 11: | Line 11: | ||
The following questions are in reference to the [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/session-demo.zip session-demo] sample node application covered in [[WebFund 2013F: Tutorial 5|Tutorial 5]]. | The following questions are in reference to the [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/session-demo.zip session-demo] sample node application covered in [[WebFund 2013F: Tutorial 5|Tutorial 5]]. | ||
# What happens if you remove the line requiring the <tt>http</tt> module? The <tt>path</tt> module? | # (2 points) What happens if you remove the line requiring the <tt>http</tt> module? The <tt>path</tt> module? | ||
# What is the secret used to help prevent attackers from creating their own fake session identifiers? | # (2 points) What is the secret used to help prevent attackers from creating their own fake session identifiers? | ||
# How can I change the port node listens on without changing the code? | # (2 points) How can I change the port node listens on without changing the code? | ||
# The user "User" logs in to the application in two web browsers, A and B, simultaneously. "User" then logs out of browser A. After reloading /users in browser B, how many users are shown as being logged in? (Assume no other users.) | # (2 points) The user "User" logs in to the application in two web browsers, A and B, simultaneously. "User" then logs out of browser A. After reloading /users in browser B, how many users are shown as being logged in? (Assume no other users.) | ||
# Modify the code so that it keeps track of how many times an individual user is logged in. List only the functions/statements you changed or added (specifying which file(s) they are in). Do not submit separate files. | # (8 points) Modify the code so that it keeps track of how many times an individual user is logged in. List only the functions/statements you changed or added (specifying which file(s) they are in). Do not submit separate files. | ||
===Part B=== | ===Part B=== |
Revision as of 17:57, 5 October 2013
This assignment is not yet finalized
Please submit your answers as a single text or PDF file uploaded to CULearn with "COMP 2406 Assignment 2", your name, student number, and the date as the first four lines of the file. No other formats will be accepted. Submitting in another format may result in your assignment not being graded and you receiving no marks for this assignment.
This assignment has ?? points.
Questions
Part A
The following questions are in reference to the session-demo sample node application covered in Tutorial 5.
- (2 points) What happens if you remove the line requiring the http module? The path module?
- (2 points) What is the secret used to help prevent attackers from creating their own fake session identifiers?
- (2 points) How can I change the port node listens on without changing the code?
- (2 points) The user "User" logs in to the application in two web browsers, A and B, simultaneously. "User" then logs out of browser A. After reloading /users in browser B, how many users are shown as being logged in? (Assume no other users.)
- (8 points) Modify the code so that it keeps track of how many times an individual user is logged in. List only the functions/statements you changed or added (specifying which file(s) they are in). Do not submit separate files.
Part B
The following questions are in reference to puzzle.js, listed below.
Part C
Conceptual questions
Code
puzzle.js
puzzle code