{% extends 'vulnerabilities/levels/docker_base.html' %}
{% load static %}
{% load crispy_forms_tags %}

{% block level_title %}The Hidden Query{% endblock %}

{% block level_description %}
<div>
 <p>
  Deep within the digital labyrinth of CyberVault lies a seemingly ordinary login form, guarding access to the users' most valuable data. To the untrained eye, it appears to be a simple gate, but those with the right skills know that even the strongest defenses can harbor hidden weaknesses.
 </p>
 <p>
  Your mission is to probe the login form and discover how deep its security measures go. There's a way to bypass this barrier and find your way to the treasures it protects. Finding the right combination of inputs may unlock the gate and grant you access to what lies beyond.
 </p>
 <p>
   Remember, the answer is in understanding the interactions between the form and its backend. Navigate carefully and let your instincts guide you through this digital maze to uncover its hidden secrets.
 </p>
</div>
{% endblock %}

{% block hint_url %}
{% url 'vulnerabilities/level/hint' level_num=8 hint_num=1 %}
{% endblock %}

{% block level_content %}
{{ block.super }}

<div class="container mt-5">
  <div class="row">
    <div class="col-md-6 offset-md-3">
      <div class="card">
        <div class="card-body">
          <h2 class="card-title text-center mb-4">Enter administration password</h2>
          <form id="login-form" class="needs-validation" novalidate>
            <div id="login-form-errors" class="alert alert-block alert-danger" style="display: none;">
            </div>
            {{ form | crispy }}
            <div class="d-grid gap-2">
              <button type="submit" class="btn btn-primary">Log In</button>
            </div>
          </form>
        </div>
        <div class="card-footer">
          <div id="docker-ws-results"></div>
        </div>
      </div>
    </div>
  </div>
</div>

<!--
This form is used dynamically when submitting a level.
You don't need to touch it for purposes of solving this level,
it is only used internaly in the DEMO portal.
-->
<form id="submission-form" method="POST" style="display: none;">
  {% csrf_token %}
  <input id="submission-token" type="hidden" name="token" value="">
</form>
{% endblock %}

{% block extra %}
{{ block.super }}

<script src="{% static 'js/level8_docker_consumer.js' %}"></script>
{% endblock %}

{% comment %}
vi: ft=htmldjango
{% endcomment %}
