Skip to content

The output of a program is not checked to be a regular file #31

@rqu

Description

@rqu

Where a regular file is expected as the output of the evaluated program, a symlink usually goes unnoticed.

Steps to reproduce:

Submit the following program to a C or C++ exercise judged by the token judge according to its stdout. External commands are not really needed; this could be implemented using only C.

#include <stdlib.h>

int main(int argc, char** argv) {
	system("ln -sf expected.out *.stdout");
	return 0;
}

Expected behavior: The solution should be rejected.

Observed behavior: The solution is accepted.

I am not sure what component should be responsible for filtering out symlinks (should each and every judge check its input?).

Note: this is unrelated to #29, which is about directory symlinks. Symlinks to files are always copied unresolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions