Skip to content
Permalink
3339c012d1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
54 lines (40 sloc) 1.34 KB
{% extends "base.html" %}
{% block navTabs %}
{% include "helpers/sessionNav.html" %}
{% endblock navTabs %}
{% block content %}
<h1>Storing State: Challenge</h1>
<p>As HTTP is stateless we need some way of storing state.
Here we will look at some (un)common approaches that people might use</p>
<p>In this example, the devs are storing state in a particularly bad way.
(I have seen this in emails vith "staff" and "student" views)</p>
<p>For the basic challenge. Try to become an "admin" user.</p>
<p>HINT: Pay attention to the form, and the request data being sent to the server. Dont over think it!</p>
<div class="section">
<h2>Login Form</h2>
<form>
<div class="row">
<div class="input-field col s12">
<input id="user" name="user" type="text">
<label for="user">User Name</label>
</div>
</div>
<button class="btn waves-effect waves-light" type="submit">Submit</button>
</form>
</div>
{% if uName %}
<div class="section">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">Result</span>
<p>Loggged in as <strong>{{ uName }}</strong></p>
{% if admin == "1" %}
<p><strong>Admin:</strong> Have a Flag: {{ flag }}</p>
{% else %}
<p>Not Admin</p>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endblock content %}