Closed pl4nty closed 1 year ago
So this is with [cookies]
in the global namespace right?
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:
[config]
test = test
[challenges]
[[testing]]
location = test
path = asdf
[[testing2]]
location = test
path = asdf
[http]
[[cookies]]
test = test
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
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