dqw / owaspantisamy

Automatically exported from code.google.com/p/owaspantisamy
0 stars 0 forks source link

Allow use of InputStream for Policy instead of File #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In a web application, you can't necessarily depend on knowing the complete path 
to the policy file.  
I've attached a patch that will allow you to use an InputStream instead of a 
File or String filename.  It 
required modification to the private constructor, but should otherwise be 100% 
compatible.  Any 
IOExceptions are wrapped in a PolicyException.

Example use:
Policy pol = 
Policy.getInstance(getClass().getResourceAsStream("/resources/antisamy.xml");
...

Original issue reported on code.google.com by william....@gmail.com on 5 Apr 2008 at 8:51

Attachments:

GoogleCodeExporter commented 8 years ago
This is definitely a worthy patch, but I am under the gun to get 1.1.1 out the 
door
today before I am unable to work on it for a few weeks. I will integrate this 
patch
in the next version, I promise!

Thanks so much for sending the patch file, it makes things so much easier! I 
just
don't have time to do the proper testing.

Thanks,
Arshan

Original comment by arshan.d...@gmail.com on 16 Apr 2008 at 2:45

GoogleCodeExporter commented 8 years ago

Original comment by arshan.d...@gmail.com on 16 Apr 2008 at 2:46

GoogleCodeExporter commented 8 years ago
i look forward to this enhancement.  It was a pain to do myself.

Original comment by tie...@gmail.com on 20 May 2008 at 1:17

GoogleCodeExporter commented 8 years ago
Added for 1.2 release.

Original comment by arshan.d...@gmail.com on 2 Jun 2008 at 7:34