t1gor / Robots.txt-Parser-Class

Php class for robots.txt parse
MIT License
83 stars 31 forks source link

Relative paths is always allowed #69

Open JanPetterMG opened 8 years ago

JanPetterMG commented 8 years ago
User-agent: *
Disallow: /
$this->assertTrue($parser->isDisallowed("&&1@|"));
$this->assertFalse($parser->isAllowed('+£€@@1¤'));

The two tests above fails, paths allowed according to the parser, the robots.txt says otherwise...

At least the second one could also be an potential relative path, so we can't just ignore this bug either, we have to fix it...

JanPetterMG commented 8 years ago

Also applies to:

$this->assertFalse($parser->isAllowed('path'));
$this->assertFalse($parser->isAllowed('*wildcard'));

I'm not sure why I didn't test that earlier... :confused: This is no longer an low-priority issue, but an huge and prioritized one!