| 1187 | return True |
| 1188 | |
| 1189 | def domain_return_ok(self, domain, request): |
| 1190 | # Liberal check of. This is here as an optimization to avoid |
| 1191 | # having to load lots of MSIE cookie files unless necessary. |
| 1192 | req_host, erhn = eff_request_host(request) |
| 1193 | if not req_host.startswith("."): |
| 1194 | req_host = "."+req_host |
| 1195 | if not erhn.startswith("."): |
| 1196 | erhn = "."+erhn |
| 1197 | if domain and not domain.startswith("."): |
| 1198 | dotdomain = "." + domain |
| 1199 | else: |
| 1200 | dotdomain = domain |
| 1201 | if not (req_host.endswith(dotdomain) or erhn.endswith(dotdomain)): |
| 1202 | #_debug(" request domain %s does not match cookie domain %s", |
| 1203 | # req_host, domain) |
| 1204 | return False |
| 1205 | |
| 1206 | if self.is_blocked(domain): |
| 1207 | _debug(" domain %s is in user block-list", domain) |
| 1208 | return False |
| 1209 | if self.is_not_allowed(domain): |
| 1210 | _debug(" domain %s is not in user allow-list", domain) |
| 1211 | return False |
| 1212 | |
| 1213 | return True |
| 1214 | |
| 1215 | def path_return_ok(self, path, request): |
| 1216 | _debug("- checking cookie path=%s", path) |