Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.39 KB

README.md

File metadata and controls

57 lines (40 loc) · 1.39 KB

ctfd-theme-pbctf

Custom CTFd theme made for pbctf

Setup

cd /path/to/CTFd
git clone https://github.com/perfectblue/ctfd-theme-pbctf.git themes/pbctf -b dist

Related projects

Development

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
# when you use this please serve patched CTFd server as below at localhost:8000
$ npm run dev

# Run this initially to setup the ctfdist directory (to allow version
# controlling of the ctfdist directory on the dist branch)
git clone https://github.com/perfectblue/ctfd-theme-pbctf.git -b dist ctfdist

# build the theme into ctfdist directory
$ npm run build

# build static website
$ SESSION=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx npm run generate

Following patch is required during development (don't do this in production):

diff --git a/CTFd/api/v1/users.py b/CTFd/api/v1/users.py
index 9317209..a52bdda 100644
--- a/CTFd/api/v1/users.py
+++ b/CTFd/api/v1/users.py
@@ -41,7 +41,8 @@ class UserList(Resource):

         return {
             'success': True,
-            'data': response.data
+            'data': response.data,
+            'nonce': session.get('nonce')
         }

     @users_namespace.doc(params={'notify': 'Whether to send the created user an email with their credentials'})