-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configurable cookies via config file #114
Conversation
So this is with I would rather see cookies as a subsection to config. Would switching to configobj make that work? https://configobj.readthedocs.io/en/latest/index.html |
This format works, indents aren't required though [config]
url = https://myctf.ctfd.io
access_token = mytoken
[[cookies]]
site_password = mypassword |
Any progress with this? |
Sorry I got caught up with other things and this slipped my mind. Let me review the format that's getting reviewed here and I'll make any changes needed. I think what was bugging me was the indent for cookies but I missed that the indent wasn't necessary. |
So I would really like if the config format was like:
And configobj is very close but it doesn't seem possible to add newlines at the end of every top level section. It's a minor thing but I'm looking into a solution. |
I'm also considering toml perhaps... |
Have you had any luck with other options? My usecase is preventing public access to my challenge instance until a specific time, but still allowing select people to create accounts |
This reverts commit 4009908.
I really don't like this structure but I suppose thats why ctfcli is in beta. Ultimately I felt that while the configobj structure was better, it ran into other issues with the other improvements I wanted to make. And if it wasn't going to be good long term, why even add in the dependency. I found that TOML supports the structure that we currently use as well as adds more capabilities so long term we will move to TOML as part of #109. For now, adding cookies into the global namespace is a hack that we will support until we move to TOML. |
For example:
Allows ctfcli to connect when a site password is configured. Fixes #111