Ad
  • Custom User Avatar

    I've tested 2 solutions and it work so I guess the code you made is a bit sub-optimal or run in loop.

  • Custom User Avatar

    Test case are run sequentially therefore if the code produced include a global variable, you want to make sure to re-initialize each global variable at the beginning of the solve method.

    I hope this clue help you.

  • Custom User Avatar

    As most of kata there is hidden testcase so trying to get away by hardcoding each case isn't the goal of this kata.
    The path you're going right now just continue to expose vulnerability.

    If you want to hardcode every sound I suggest you listen to this song : Ylvis - The Fox (What Does The Fox Say?) https://www.youtube.com/watch?v=jofNR_WkoCE

    Happy new year!

  • Custom User Avatar

    Hi,

    Thanks for the issue, I've modified the tests and description. I've referenced to the OWASP Top 10 2017 A3-Sensitive_Data_Exposure instead of the LFI label as you've pointed out wasn't exact. I've also modify the proposed solution to use open_basedir and only allow .txt file within the specific folder.
    If you're good with the proposed solution I would mark both issue as solved.

    Best regard,

  • Custom User Avatar

    I'm doing the following line in the assertions:

    solution =  solve(...)
    flat_solution = list(itertools.chain(*solution))
    only_int = all(type(i) is int for i in flat_solution)
    Test.assert_equals(only_int, True, "You're solution shound only contains int")
    

    now I don't know why you're solution isn't completly iterable but I may assume something wrong?
    Tell me if you find something please!

    Thanks

  • Custom User Avatar

    Hi!

    Thanks for the comment, I'll change the problem description to be more explicit. I don't expect you to give every valid solution, I just expect you can give me one of the solution.

  • Custom User Avatar

    Hi,

    Thanks for taking the time to ask, maybe the solution given contains a string of codewars changed their version of python. I've added an assertion to make sure that solution only contains int
    Test.assert_equals(only_int, True, "You're solution shound only contains int")

  • Custom User Avatar

    does your function clean all your defined variable?
    beside that I don't see why this shouldn't work.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I've give some hint in the description for possible algorithm to add now.

  • Custom User Avatar

    Hi,
    I've changed the pre-test and is testing the change to make sure it's working as expected.

    I will also try to find a reference of an algorithme but basicly at some point you need some kind of mixe between deterministic and brute force.

  • Custom User Avatar

    Harder one? I even included 2 puzzles that are imperfect / have multiple solutions if you dare to try the beta and collaborate to make it approved!

    http://www.codewars.com/kata/hard-sudoku-solver

  • Custom User Avatar

    Harder one? I even included 2 puzzles that are imperfect / have multiple solutions if you dare to try the beta and collaborate to make it approved!

    http://www.codewars.com/kata/hard-sudoku-solver

  • Custom User Avatar

    Harder one? I even included 2 puzzles that are imperfect / have multiple solutions if you dare to try the beta and collaborate to make it approved!

    http://www.codewars.com/kata/hard-sudoku-solver

  • Custom User Avatar

    I'd had a test that explicitly explain the exact 10 minutes walk.
    I'm lazy and prefer to read spec from test so basicly something like
    test.assert_equals(['n', 's'], False)

    Other then that I really enjoyed this kata!