jhthorsen / json-validator

:cop: Validate data against a JSON schema
https://metacpan.org/release/JSON-Validator
56 stars 58 forks source link

fix for infinite recursion on Windows, issue #170 #178

Closed chorny closed 4 years ago

chorny commented 4 years ago

So it would be lowercase and match

karenetheridge commented 4 years ago

So, it appears (from inferring from the patch provided) that infinite recursion is occuring because two paths are being compared case-sensitively on a case-insensitive filesystem, and they should match but they do not. Where in the tests is that happening? That is, where are two paths provided that are identical-except-for-case?

This also provides a hint for writing a demonstration test -- one could perhaps hack CASE_TOLERANT so it is the same value across all platforms (for this one test), and demonstrate how behaviour is different with and without the lc.

I'm also curious where the path comparison is taking place, such that lower-casing is necessary -- because lc is not necessarily the right thing to do here, given various locales' handling of case. When comparing strings, foldcase (fc) is preferred.

jhthorsen commented 4 years ago

I'm going to close this, since it seems like @charsbar is not interested in this anymore.

charsbar commented 4 years ago

@jhthorsen , well maybe it was @chorny not me, but anyway, I sent a modified version of this PR #180

jhthorsen commented 4 years ago

That was a bad autocomplete from me. Sorry about that 😢