Closed HeRaNO closed 11 months ago
Hi @HeRaNO, I've tried to reproduce this and I can't. Can you maybe upload a bit more screenshots on how you submit this?
When I upload a file ending with the .doc
syntax via submit the following field will stay empty: Language
but for you this got picked up as C
? Or did you manually select C
as language?
If it's the first case this is indeed a bug, in the second case the message match any of the allowed extensions
would be wrong as a participant can decide to hand something in with a custom extension (think about someone who can decide to use .py2
vs .py3
) and the system should just leave the language selection to the team IMO.
I think the problem is that when the option Filter files passed to compiler by extension list
is enabled, the system only checks if the filename ends with 'c', which is the case for .doc
. Uploading any other file, e.g. .pdf
and selecting C
as language will fail with the expected behavior described above. This has nothing to do with custom extensions and language selection, I think.
Of course, the user has to select the Language C
manually, but the filter should step in (only if the option is activated). I agree that this should be expected behaviour.
The filter algorithm linked above is probably not perfect in this sense.
Hi @HeRaNO, I've tried to reproduce this and I can't. Can you maybe upload a bit more screenshots on how you submit this?
When I upload a file ending with the
.doc
syntax via submit the following field will stay empty:Language
but for you this got picked up asC
? Or did you manually selectC
as language?If it's the first case this is indeed a bug, in the second case the message
match any of the allowed extensions
would be wrong as a participant can decide to hand something in with a custom extension (think about someone who can decide to use.py2
vs.py3
) and the system should just leave the language selection to the team IMO.
Hi and yes, it's the second case. The participant manually selects C
language.
So the extension filter does not mean to must submit files among these extensions
, it's only used to infer the language that participants use? Maybe I have some misunderstanding about it.
Hi @HeRaNO, I've tried to reproduce this and I can't. Can you maybe upload a bit more screenshots on how you submit this? When I upload a file ending with the
.doc
syntax via submit the following field will stay empty:Language
but for you this got picked up asC
? Or did you manually selectC
as language? If it's the first case this is indeed a bug, in the second case the messagematch any of the allowed extensions
would be wrong as a participant can decide to hand something in with a custom extension (think about someone who can decide to use.py2
vs.py3
) and the system should just leave the language selection to the team IMO.Hi and yes, it's the second case. The participant manually selects
C
language.So the extension filter does not mean to
must submit files among these extensions
, it's only used to infer the language that participants use? Maybe I have some misunderstanding about it.
No, you are right: Enabling the filter should result in must submit files among these extensions
. Language inference is always used.
There is just a small oversight in the code. I think I can work on fixing it.
Hi @HeRaNO, I've tried to reproduce this and I can't. Can you maybe upload a bit more screenshots on how you submit this? When I upload a file ending with the
.doc
syntax via submit the following field will stay empty:Language
but for you this got picked up asC
? Or did you manually selectC
as language? If it's the first case this is indeed a bug, in the second case the messagematch any of the allowed extensions
would be wrong as a participant can decide to hand something in with a custom extension (think about someone who can decide to use.py2
vs.py3
) and the system should just leave the language selection to the team IMO.Hi and yes, it's the second case. The participant manually selects
C
language. So the extension filter does not mean tomust submit files among these extensions
, it's only used to infer the language that participants use? Maybe I have some misunderstanding about it.No, you are right: Enabling the filter should result in
must submit files among these extensions
. Language inference is always used.There is just a small oversight in the code. I think I can work on fixing it.
OK I got that. Thank you. 👍
Description of the problem
doc
file can be submitted as code. It seems the file bypasses the file extension check.Your environment
Steps to reproduce
A.zip
Unzip the archive first, and submit the
A.doc
to any problem. Language setting sets as default.Expected behaviour
Actual behaviour