mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
@@ -2,11 +2,9 @@ from __future__ import division # Use floating point for math calculations
|
||||
from CTFd.plugins.challenges import BaseChallenge, CHALLENGE_CLASSES
|
||||
from CTFd.plugins import register_plugin_assets_directory
|
||||
from CTFd.plugins.flags import get_flag_class
|
||||
from CTFd.models import db, Solves, Fails, Flags, Challenges, ChallengeFiles, Tags, Teams, Hints
|
||||
from CTFd import utils
|
||||
from CTFd.utils.migrations import upgrade
|
||||
from CTFd.models import db, Solves, Fails, Flags, Challenges, ChallengeFiles, Tags, Hints
|
||||
from CTFd.utils.user import get_ip
|
||||
from CTFd.utils.uploads import upload_file, delete_file
|
||||
from CTFd.utils.uploads import delete_file
|
||||
from CTFd.utils.modes import get_model
|
||||
from flask import Blueprint
|
||||
import math
|
||||
|
||||
@@ -56,10 +56,17 @@
|
||||
{% for file in files %}
|
||||
<div class='col-md-4 col-sm-4 col-xs-12 file-button-wrapper d-block'>
|
||||
<a class='btn btn-info btn-file mb-1 d-inline-block px-2 w-100 text-truncate'
|
||||
href='{{ script_root }}/files/{{ file }}'>
|
||||
href='{{ file }}'>
|
||||
<i class="fas fa-download"></i>
|
||||
<small>
|
||||
{{ file.split('/')[1] }}
|
||||
{% set segments = file.split('/') %}
|
||||
{% set file = segments | last %}
|
||||
{% set token = file.split('?') | last %}
|
||||
{% if token %}
|
||||
{{ file | replace("?" + token, "") }}
|
||||
{% else %}
|
||||
{{ file }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@ window.challenge.data = undefined;
|
||||
|
||||
window.challenge.renderer = new markdownit({
|
||||
html: true,
|
||||
linkify: true,
|
||||
});
|
||||
|
||||
window.challenge.preRender = function () {
|
||||
|
||||
Reference in New Issue
Block a user