OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adam Barth. All Rights Reserved. | 2 * Copyright (C) 2011 Adam Barth. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool filterEmbedToken(HTMLToken&); | 64 bool filterEmbedToken(HTMLToken&); |
65 bool filterAppletToken(HTMLToken&); | 65 bool filterAppletToken(HTMLToken&); |
66 bool filterIframeToken(HTMLToken&); | 66 bool filterIframeToken(HTMLToken&); |
67 bool filterMetaToken(HTMLToken&); | 67 bool filterMetaToken(HTMLToken&); |
68 bool filterBaseToken(HTMLToken&); | 68 bool filterBaseToken(HTMLToken&); |
69 bool filterFormToken(HTMLToken&); | 69 bool filterFormToken(HTMLToken&); |
70 | 70 |
71 bool eraseDangerousAttributesIfInjected(HTMLToken&); | 71 bool eraseDangerousAttributesIfInjected(HTMLToken&); |
72 bool eraseAttributeIfInjected(HTMLToken&, const QualifiedName&, const String
& replacementValue = String(), AttributeKind treatment = NormalAttribute); | 72 bool eraseAttributeIfInjected(HTMLToken&, const QualifiedName&, const String
& replacementValue = String(), AttributeKind treatment = NormalAttribute); |
73 | 73 |
74 String snippetForRange(const HTMLToken&, int start, int end); | 74 String decodedSnippetForToken(const HTMLToken&); |
75 String snippetForJavaScript(const String&); | 75 String decodedSnippetForName(const HTMLToken&); |
76 String decodedSnippetForAttribute(const HTMLToken&, const HTMLToken::Attribu
te&, AttributeKind treatment = NormalAttribute); | 76 String decodedSnippetForAttribute(const HTMLToken&, const HTMLToken::Attribu
te&, AttributeKind treatment = NormalAttribute); |
| 77 String decodedSnippetForJavaScript(const HTMLToken&); |
77 | 78 |
78 bool isContainedInRequest(const String&); | 79 bool isContainedInRequest(const String&); |
79 bool isSameOriginResource(const String& url); | 80 bool isSameOriginResource(const String& url); |
80 | 81 |
81 HTMLDocumentParser* m_parser; | 82 HTMLDocumentParser* m_parser; |
82 bool m_isEnabled; | 83 bool m_isEnabled; |
83 XSSProtectionDisposition m_xssProtection; | 84 XSSProtectionDisposition m_xssProtection; |
84 | 85 |
85 String m_decodedURL; | 86 String m_decodedURL; |
86 String m_decodedHTTPBody; | 87 String m_decodedHTTPBody; |
87 OwnPtr<SuffixTree<ASCIICodebook> > m_decodedHTTPBodySuffixTree; | 88 OwnPtr<SuffixTree<ASCIICodebook> > m_decodedHTTPBodySuffixTree; |
88 | 89 |
89 State m_state; | 90 State m_state; |
90 String m_cachedSnippet; | 91 String m_cachedDecodedSnippet; |
91 bool m_notifiedClient; | 92 bool m_notifiedClient; |
92 }; | 93 }; |
93 | 94 |
94 } | 95 } |
95 | 96 |
96 #endif | 97 #endif |
OLD | NEW |