From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Priority of url-cookie-trusted-urls vs url-cookie-untrusted-urls Date: Fri, 31 Jul 2020 08:20:25 -0700 Message-ID: <24356.14009.544049.901280@retriever.mtv.corp.google.com> References: <20200731144809.6E89CC21C82@raman-glaptop.localdomain> <87d04b20qt.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37166"; mail-complaints-to="usenet@ciao.gmane.io" Cc: schwab@linux-m68k.org, raman@google.com, emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 31 17:21:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k1WqO-0009Yp-5p for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Jul 2020 17:21:12 +0200 Original-Received: from localhost ([::1]:52982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1WqN-00024P-6s for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Jul 2020 11:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1Wpk-0001Ve-5S for emacs-devel@gnu.org; Fri, 31 Jul 2020 11:20:32 -0400 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1Wpi-0005gv-CF for emacs-devel@gnu.org; Fri, 31 Jul 2020 11:20:31 -0400 Original-Received: by mail-pf1-x42f.google.com with SMTP id 74so6385257pfx.13 for ; Fri, 31 Jul 2020 08:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:mime-version:content-transfer-encoding:message-id:date:to:cc :subject:in-reply-to:references; bh=ktRy7koNugg3RnolqMktKhMKFQm8M+sfrOvQv4xDYzg=; b=dXoqu0fx2LmKHmsH5ANh6HkkPzRuUGyM8w+1dl7TUVjpb87jGoosrZ4y6sWd0w02yp U+5bH5jZdUABayYRJhb0icicBbtKD8wOYKyeyieb+VDxXbQJfv8+dfX3VU/jwGmWOkpi gRQvAErgnVQZO0TZEWrAYi7Z4VHl0bRK9rxDfc8gTXv8LRp0nZ7I1Okcto0qtyrlPOOo T6slRCwKzdIUTVBHVhsPl/Vlmarmv3p3Sdu7HihH1Bnb6i2ZE0bZyjmwZ5x20ADnfruU V4Zuf49J7XQIWDMGCLBfkaG+/WCnfh2fHiOxvhZnfsLLoW0AD/j7iArzMJXhVhWIM0i1 cuOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references; bh=ktRy7koNugg3RnolqMktKhMKFQm8M+sfrOvQv4xDYzg=; b=ZuFoKdRZo1aCfOP2LoYREW495uRq0pgZwhkwrgUdkk76hRUtvlrDlBjRimpBxd0n39 7KzeIFRDQPeJDCEc1wBx2pv3T1ggbQcJfhu9eUlxqk9i3+G84ZUpRn5zPcMxCFCW8al3 oDh8ZDUcVqMUt3NZVMYX23/9m/8Sr9Bmy5Fa+pg5UGQzcFOYMqTU7xWc865tnZDrTrTo VG8jWPr6vsLjIjw32/Vb7qZ8DqxmBd1szY7/jiVMKyw1cpz59BU2mz8TfRS8KYEtlPID L2QNC+P8QD7cNA86A5nmuX/BHzkP0TFmB4gqv/fMCLwSYjC5khdgx4Cqw80oElmXBAkK 0pGA== X-Gm-Message-State: AOAM533WUh4gF1sM/dj6DgGEtTTaUjJXST8saX10yP2RfzlORYT/nA3O MWQMcLiOjheaCDmxcAA6n7yoDqlXBzQ= X-Google-Smtp-Source: ABdhPJzIgT16sZ/7sMMpp0FpXXI+bQmkQD5qxBsEAcrEYh7BuLNPjRnTvFQxg8Ennakd0y4AI2/+Cw== X-Received: by 2002:a62:1713:: with SMTP id 19mr4164600pfx.115.1596208827854; Fri, 31 Jul 2020 08:20:27 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com ([2620:0:1000:1510:7220:84ff:fe0f:a150]) by smtp.gmail.com with ESMTPSA id b78sm10670785pfb.144.2020.07.31.08.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 08:20:26 -0700 (PDT) Original-Received: by retriever.mtv.corp.google.com (Postfix, from userid 13930) id 958F918003E2; Fri, 31 Jul 2020 08:20:25 -0700 (PDT) In-Reply-To: X-Mailer: VM 8.1.1 under 28.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=raman@google.com; helo=mail-pf1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -185 X-Spam_score: -18.6 X-Spam_bar: ------------------ X-Spam_report: (-18.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253369 Archived-At: Might be better to redo this with a simple filter/unfilter logic analogous to traditional allow/deny configurations in unix eg allowed_hosts vs denied_hosts. As it stands, one will always need to read the source code to know exactly what this does Stefan Monnier writes: > >> From what I observe, if you set url-cookie-untrusted-urls to '(".*"), > >> then the setting in url-cookie-trusted-urls e.g. '("example.com") has > >> no effect. This makes it hard to set up emacs/eww to not trust any > >> domain, and then progressively allow a few domains to set cookies; > >> could the priority order of these settings be reversed? > > > > If you set url-cookie-untrusted-urls to ("") it will always be less > > specific than any match from url-cookie-trusted-urls. > > IIUC which one takes precedence depends on the length of the > match, right? If so, the docstring should say so. > > > Stefan -- Id: kg:/m/0285kf1 -- Id: kg:/m/0285kf1