Commit Graph

58 Commits

Author SHA1 Message Date
Kevin Chung
ad34dbf970 Fixing key updating 2017-04-20 17:59:45 -04:00
Kevin Chung
4795a9e742 Fixing key editting 2017-04-20 16:59:43 -04:00
Kevin Chung
80575e98fe Fixing preview height 2017-04-09 02:31:59 -04:00
Victor "Nate" Graf
3add93a172 fixed an eror in admin chllenge modals naming (#242)
Although the code worked, I accidentally included a pull of an
empty file. This commit fixes that mistake
2017-04-09 01:55:56 -04:00
Victor "Nate" Graf
fd22ef98dc challenge update modal is now replaceable (#236)
* challenge update modal is now replaceable

By defining
* [type]-challenge-update.hbs
* [type]-challenge-modals.hbs
* [type]-challenge-update.js

in the /static/admin/js/templates/challenges/[type] folder the
challenge update modal will be defined for any challenges of
the given type. This allows for essentially full customizability
of how you will edit custom challenge types in the admin UI.

The reason for having two files, *update.hbs and *modals.hbs, is
that *update.hbs defines the body for the main challenge update
modal, while *modals.hbs defines any additional modals which will be
used within the main modal

There is one function which is required in *update.js is
`openchal(id)` which will be passed the id of the challenge to be
edited and should open the modal as well as load any needed data

* fixed multi-modal issues

Issues were coming from two sources:
* I had placed the modals in an indirect relationship in the DOM
  tree. They need to be siblings I now see
* There was double counting of modals within multi-modal.js. This
  only started to appear with the dynamically loaded modals. I
  fixed the script to accurately count modals each time
2017-04-08 01:20:22 -04:00
Kevin Chung
b027703f80 Fixing hiding challenges unintentionally 2017-04-04 03:48:55 -04:00
Kevin Chung
98071c1874 Passes management of the description to the js template 2017-04-01 16:43:41 -04:00
Kevin Chung
f48a0cdacd Hints (#232)
* Switching to Flask-Migrate to create tables/database. Adding Hints & Unlocks.
* Adding db.create_all call for sqlite db's (sqlite is not properly handled with alembic yet)
* Python 3 testing works properly with 3.5
* Adding admin side of hints
* Hints are viewable for users
2017-03-28 21:17:56 -04:00
Kevin Chung
57de89fc57 Removing functionality from the update keys button
This makes the button do nothing but ultimately the issue is that the
buttons should automatically update the database through AJAX or
similar. This is a temporary fix so the Keys modal isn’t an outlier in
design and doesn’t cause an error.
2017-03-12 11:12:44 -04:00
Kevin Chung
613ede5738 Max attmpts (#227)
* Making max_attempts use the Challenge value instead of the Config value
2017-03-09 23:47:08 -05:00
Kevin Chung
d0cb92c644 Hide scores (#224)
* Starting work on hide_scores functionality

* Hide teams in more views

* Starting work on hide_scores functionality

* Hide teams in more views
2017-03-08 00:21:39 -05:00
Kevin Chung
3022a7a01a Closes #213
* Fixes running CTFd under a folder
2017-03-02 20:28:17 -05:00
Kevin Chung
fdb2c34d88 Testing branch (#211)
* Extracting key checking logic to make it more extensible

* Add missing keys __init__ file

* Adding logging access and errors to Dockerfile

* Use template inheritance for page.html (#198)

* Fix exception on cofirmation screen (#202)

When a user attempts to confirm an e-mail address, an exception is thrown because the db session is closed prior to logging.

The line db.session.close() has to move after the logging, otherwise the team parameters from the orm object are discarded and an exception is thrown.

Closing the session after logging, fixes the issue.

* Adding custom key types for challenges

* Separating out admin.py, adding challenge types

* Don't let truncate affect edit modal

* File uploads no longer refresh page (#207)

Closes (#180)

* Fixing missing import

* Fixing mistake in flag JSON response

* Removing compare_digest to support Python 2.7.6

* Fixing inconsistencies in standard challenge modal

* Passing submission input over to template js

* Handling cases where data can't be found in the DOM better

* Don't refresh modal if it's just a refresh operation

* Fixing solving challenges while scoreboard is public

Induce a redirect to make user login

* Adding missing js file and fixing migration

* Fixing some visual glitches and streamlining challenge creation
2017-02-24 21:46:25 -05:00
Victor "Nate" Graf
22f57751e0 Closes #169
Changed the /chals/colves endpoint and associated javascript to
index solves by challenge id rather than by challenge name

Closes (#169)
2016-12-08 00:26:03 -05:00
Kevin Chung
068006874d Closes #168 2016-11-20 03:31:26 -05:00
Kevin Chung
dce34af7a9 Fixing some glitches
* Loading challenges from the location hash wouldn't have hashes because
the solves attribute wouldn't be populated.
* Making pages already be in a container so people don't need to add it.
2016-11-20 00:24:22 -05:00
Kevin Chung
5821bad388 Seperating admin and original themes
Also fixing a bug in setting end times
2016-11-19 18:38:45 -05:00
Kevin Chung
04d47d1d54 CTFTime configuration setting improvements
Thanks MomentJS!
2016-11-11 05:41:44 -05:00
Kevin Chung
52ad396db4 Adding file handler 2016-11-05 00:54:21 -04:00
Kevin Chung
c81281f859 This is the best fix for #157
so many tries :(
2016-09-27 23:55:31 -04:00
Kevin Chung
10ef13e9d5 Causes some history glitches 2016-09-27 22:16:26 -04:00
Kevin Chung
9cf8dbf8ad Improving fix for #157 2016-09-27 22:10:35 -04:00
Kevin Chung
60bb118e16 Closes #157 2016-09-27 21:54:22 -04:00
Kevin Chung
50043b42c5 Merging changes from various forks
Until v1 is released all changes are fair game.

Caching support
Fixes for decoding confirmation and reset_password email tokens
Starting work on #154 specifying why challenges are not open
Adding a required parameter to HTML to sort of fix #153
Adding a column to specify when a team registered
Check static key by default in new key
Decreasing capability of pages functionality to address security
concerns
Fixing confirmations restrictions by modifying can__view_challenges()
2016-09-24 17:56:07 -04:00
Kevin Chung
92ebd88025 Fixing scrolling issue and updating vendor JS 2016-09-19 02:41:18 -04:00
snurilov
732278587a Closes #138. (#139)
Closes #138.
2016-08-12 17:55:31 -04:00
Kevin Chung
b05f6152d3 Custom themes (#131)
* Adding preliminary custom themes

* Fixing Windows compatibility

https://github.com/pallets/jinja/issues/411

* Fixing template reloading and adding UI to change themes

* Explicitly closing db connections

* Themes now have custom static folders

* Closes #128
2016-07-22 02:46:14 -04:00
Robert Blair Mason Jr
6b2257236f Allow CTFd to run with script_root != '/' and PostgreSQL (#125)
Also, Add WSGI config example
2016-06-22 00:18:09 -04:00
Kevin Chung
a9b79770f8 Making tab switching in modals more streamlined 2016-05-26 13:46:54 -04:00
CodeKevin
e4e989a0a5 Fixing and cleaning graphs to reflect awards 2016-04-30 13:20:30 -04:00
Kevin Chung
253db6eca8 Merge pull request #111 from breadchris/master
Fixed button outlining so that custom buttons do not appear invisible
2016-04-22 18:21:07 -04:00
Kevin Chung
f4a2f165a2 Getting awards feature ready 2016-04-22 18:19:49 -04:00
Christopher Thompson
728ee63cd1 Fixed button outlining so that custom buttons do not appear invisible on site 2016-04-22 15:51:42 -04:00
Kevin Chung
5590b11636 Fixing time travel solves 2016-04-21 11:40:59 -04:00
CodeKevin
6308165dea Adding ability to hide challenges 2016-04-20 14:22:17 -04:00
Kevin Chung
f4964dffff Closes #108 2016-04-15 15:06:37 -04:00
Kevin Chung
282b311491 Reorganizing user challenge view 2016-04-15 13:33:23 -04:00
Kevin Chung
417e51eba9 Closes #104 2016-03-21 13:13:59 -04:00
Kevin Chung
742132abdb Closes #101 2016-03-17 21:06:21 -07:00
Kevin Chung
1532fc3cf4 Fixes multiple line challenge names in admin challenges panel 2016-02-20 13:47:30 -05:00
Kevin Chung
3e8f5bbbc5 Closes #93, #76 2016-02-19 14:44:56 -05:00
Bird101
704c4144e7 Fixed scoreboard show graph bug 2016-02-17 12:39:22 +08:00
delta24
3f13b15513 Fixed time rendering in the team page (admin view) 2016-02-16 10:30:56 +05:30
CodeKevin
b6b9e30e39 Fixing mobile challenge view 2016-02-07 03:15:41 -05:00
CodeKevin
115f2a473a Fixing logo on mobile 2016-02-07 00:00:05 -05:00
CodeKevin
3841322e2d Challenge tags now work 2016-02-05 23:18:36 -05:00
CodeKevin
a4b39a1eb5 Replacing C3 with plotly 2016-02-05 22:50:36 -05:00
CodeKevin
ad3c3c13b1 Improved pagination and renaming main-style.css 2016-02-05 20:59:47 -05:00
CodeKevin
9c1f1696ec Closes #82 2016-02-05 20:44:03 -05:00
Kevin Chung
7be847576a Fixing some style issues 2016-02-05 01:42:53 -05:00