Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow {{url_for}} and {{lookup}} templates in Description
The values of these templates can be determined as soon as a build of a challenge has been created, and differ from connection-related templates like {{port}} which require a running instance to have meaningful values. The advantage of allowing these tags in the Description section is that for on-demand challenges containing both artifacts and a server component (for example, binary exploitation challenges that provide both a source file and a remote server containing the flag), players no longer need to start an instances just to gain access to the artifact downloads and begin working on the challenge. This way, they do not need to start an instance of the challenge until they have developed an exploit locally and are ready to test it against the remote server. This is both more convenient for players, who historically have been confused as to why they need to start an instance just to download artifacts, and also reduces load on the Docker server. This change does mean that the Description field loses the initially intended property of being truly static across all challenge instances. In theory, it might be cleaner to instead separate descriptions into three sections: static, build-level templatable, and instance-level templatable. However, this is a much less intrusive change. Note that technically {{server}} could also be resolved by clients while only having build-level information available. However, I can't think of any situation where it is useful on its own without {{port}}, and it would be confusing to split the permitted connection-related templates between the two sections.
- Loading branch information