Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
It's not as simple as that. Everything fails for some reason when I change it to 3.6, and I don't know why. I've tried, though – does that work?
Python doesn't seem to have a language version any more.
This really needs to have more test cases. The example test case provided should definitely be in the mandatory section too, and it would be great if you could add some randomised test cases. It shouldn't be too hard to generate three random strings, where the first and third can be any length including 0 and the second has a minimum length of 1, then repeat that a few hundred times.
This comment is hidden because it contains spoiler information about the solution
Yup! You broke the attack I was going to post about just after I submitted it. One of them still gets through, though. (The
ctypes
one iirc.)I've got a clever one saved up but it's only useful once you start blocking the importing of certain modules.
You can fix the problem by checking for the vulnerabilities that
eval
causes. Try running arbitrary code, using=
etc. That will patch the real problem, then you can free up all of the features you've blocked for programmers to use again.In the meantime, I'm going to submit another attack. :-)
I'm frustrated by the implementation, but for now this works.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I've broken the Python one again (though with more code than I would have liked), and I've thought of another, shorter, cleaner one. I'm beginning to find this tricky though. You've patched almost all of the obvious ones.
https://www.codewars.com/kata/reviews/5ad0d4dd6165e69a5f00141d/groups/5b0140003d841f832f0012a2
Another way of bypassing it! https://www.codewars.com/kata/reviews/5ad0d4dd6165e69a5f00141d/groups/5b006cf149db933387002d53
Sorry it took me so long; I had to do something irl.
There are a practically unbounded number of these; you won't be able to stop them all in the way you're trying to do it. This is a fun game of cat and mouse; I've got another one that I'd like to try so could you tell me when you've fixed this one?
This comment is hidden because it contains spoiler information about the solution
Has the problem gone away?
As far as I can tell it saved before I told you about it. :-/
That "incorrect output" thing is not from the third test; it's a global test that checks whether anything was sent to output that shouldn't have been (e.g. by an uncaught exception). Try suppressingstderr
. That might fix it.It's caused by a change in the testing logic that wasn't tested properly. I'll fix it.
Loading more items...