LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 { | 147 { |
148 let parser = DownloadableSubscription.parseDownload(); | 148 let parser = DownloadableSubscription.parseDownload(); |
149 | 149 |
150 if (!parser.process(responseText)) | 150 if (!parser.process(responseText)) |
151 { | 151 { |
152 let {error} = parser; | 152 let {error} = parser; |
153 parser.delete(); | 153 parser.delete(); |
154 return errorCallback(error); | 154 return errorCallback(error); |
155 } | 155 } |
156 | 156 |
157 if (!parser.verifyChecksum()) | |
158 return errorCallback("synchronize_checksum_mismatch"); | |
159 | |
160 if (parser.redirect) | 157 if (parser.redirect) |
161 { | 158 { |
162 let {redirect} = parser; | 159 let {redirect} = parser; |
163 parser.delete(); | 160 parser.delete(); |
164 return redirectCallback(redirect); | 161 return redirectCallback(redirect); |
165 } | 162 } |
166 | 163 |
167 // Handle redirects | 164 // Handle redirects |
168 let subscription = Subscription.fromURL(downloadable.redirectURL || | 165 let subscription = Subscription.fromURL(downloadable.redirectURL || |
169 downloadable.url); | 166 downloadable.url); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 Array.from(subscription.filters, f => f.text).join("\n"); | 282 Array.from(subscription.filters, f => f.text).join("\n"); |
286 redirectCallback("data:text/plain," + encodeURIComponent(data)); | 283 redirectCallback("data:text/plain," + encodeURIComponent(data)); |
287 } | 284 } |
288 }, false); | 285 }, false); |
289 request.send(null); | 286 request.send(null); |
290 } | 287 } |
291 } | 288 } |
292 } | 289 } |
293 }; | 290 }; |
294 Synchronizer.init(); | 291 Synchronizer.init(); |
LEFT | RIGHT |