SummerOfCode/2012/UserCSP/WeeklyUpdates/2012-05-21
< SummerOfCode | 2012 | UserCSP
This Week
Monday, 21 May
- Database ("userCSP.sqlite") is created using third-party module "sqlite" for Jetpack.
- To store user defined policies for web site "userCSPTable" is created "userCSP.sqlite" database.
- Third-party module "sqlite" modified to operate on my custom database table. Such as "tableUsedOrNew" method is added to check whether "userCSPTable" table exits on user's computer or not. IF not then it create the table.
- userCSPTable contains 11 columns. domainName, defaultSrc, scriptSrc, objectSrc, imgSrc, mediaSrc, styleSrc, frameSrc, fontSrc , xhrSrc, frameAncestors.
- The data type of each field in the table is "text", and domainName is the primary key to retrieve and store CSP policies from database.