hsluoyz commented on PR #1755:
URL: https://github.com/apache/casbin/pull/1755#issuecomment-5628418879

   Thanks for reporting this, @zjncs! The problem is real: `LoadPolicy` was 
silently dropping malformed lines. We fixed it directly in 
https://github.com/apache/casbin/commit/524f3f2dc9baef696d748db491d49b3055d359d1.
 That commit returns the parse error the same way you proposed, and also trims 
each line first, like the file adapter does. Without the trim, whitespace-only 
lines and indented `#` comments (as pointed out in the review above) would 
become hard load failures. Since this covers the same fix, I'll close this PR. 
Thanks again for the contribution!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to