@@ -157,14 +157,14 @@ def validate(
157157 ) -> Tuple [float , bool , str , dict ]:
158158
159159 # safeguard: check that all open tabs are either blank or within the list of WebArena URLs
160- authorized_locations = ["newtab" , "" ] + [
161- urllib .parse .urlparse (url ).netloc
162- for url in [* self .webarena_instance .urls .values (), self .webarena_instance .home_url ]
163- ]
164- for open_page in page .context .pages :
165- page_location = urllib .parse .urlparse (open_page .url ).netloc
166- if not page_location in authorized_locations :
167- return 0 , True , "" , {"error" : "Unauthorized url, terminating task" }
160+ # authorized_locations = ["newtab", ""] + [
161+ # urllib.parse.urlparse(url).netloc
162+ # for url in [*self.webarena_instance.urls.values(), self.webarena_instance.home_url]
163+ # ]
164+ # for open_page in page.context.pages:
165+ # page_location = urllib.parse.urlparse(open_page.url).netloc
166+ # if not page_location in authorized_locations:
167+ # return 0, True, "", {"error": "Unauthorized url, terminating task"}
168168
169169 # import webarena dynamically
170170 from webarena .browser_env .actions import ActionTypes
0 commit comments