From patchwork Thu Jun 10 18:46:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Guikal X-Patchwork-Id: 1933 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.19) for (single-drop); Thu, 10 Jun 2021 18:46:55 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id 8H05Jh5ewmA3LwMAK+/4rw (envelope-from ) for ; Thu, 10 Jun 2021 18:46:54 +0000 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 19F3A656537; Thu, 10 Jun 2021 18:46:54 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id CB2C42C2D0; Thu, 10 Jun 2021 18:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.archlinux.org; s=luna; t=1623350813; bh=iNx79irzhWm3o4S44o3r/Sad+rtCZy30fxJELY4ZGYU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc; b=uuEgHeY6T74d5o5CbF8+tQwggOOEBnl3WYPkQ+MiSVD29IyHOFOv9ZQEy9cRf8391 A6Bf1HEr2ohaFjQg7KGvHXub+QLp1UEFpmBkJs69JlNYrkPS69SDnqdX9iu946Qpvu Y6/QC+IhLyjgdcfmoTi7PXgkc0DESaNqbdUs86a7Hi3cwHW8voKG7g586keRuP9ctm IdaBVM298KG8QEcyKe8EW+DEka4LEntFEhi0s0PzT922ZjwwPcEH10LLd8AkvVhR+M 7tOhmJVfHgYDR8xxZFpMMdfQyIDNKo07n+ptZqVvM3o3AEdeWuG6FpnqrIZifd5yNO Mg1BW/TMtPkJhhMbSaNirW21CnYhySaM7l0SCgMq/7p+rEzlTsE13RqCd0I9vfDxtH X5xk2oVGih1pwYcZ34zLDww1hrNQpsuWGiJQAIidL/RYz1HzCxC7V+gVo/XHAComBC ujngnKHCAAUW0Porif4mcbzFc+UR4uOwFbk/zMl43733hs/G5iDrcffbwzJPzaWilh cBryv/Pkkks3qZy+FS6HxH8lx6dnCjJz+PWkI3Ql0uY8zXtR9z1mcGpT8Dj1pVUXKj OX9FB38AihpCwlCMK1YUhoIEcjAmxOgnp0iL11oFjX2hni7ikhaAG8aXRy1iw8RYmk +PF8fio55epn/GMC6qvASLHw= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 0A2F02C2CD for ; Thu, 10 Jun 2021 18:46:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,SPF_HELO_NONE=0.001, T_DMARC_POLICY_QUAR=0.01 autolearn=failed autolearn_force=no version=3.4.6 X-Spam-BL-Results: Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by luna.archlinux.org (Postfix) with ESMTPS for ; Thu, 10 Jun 2021 18:46:50 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. To: aur-dev@lists.archlinux.org Subject: [PATCH aurweb v2] Source valid ssh prefixes from config Date: Thu, 10 Jun 2021 14:46:24 -0400 Message-Id: <20210610184623.517279-1-void@fluix.one> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: void@fluix.one X-BeenThere: aur-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Arch User Repository \(AUR\) Development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Steven Guikal via aur-dev From: Steven Guikal Reply-To: "Arch User Repository \(AUR\) Development" Cc: Steven Guikal Errors-To: aur-dev-bounces@lists.archlinux.org Sender: "aur-dev" Authentication-Results: mail.archlinux.org; dkim=pass header.d=lists.archlinux.org header.s=luna header.b=uuEgHeY6; dmarc=pass (policy=none) header.from=archlinux.org; spf=pass (mail.archlinux.org: domain of aur-dev-bounces@lists.archlinux.org designates 5.9.250.164 as permitted sender) smtp.mailfrom=aur-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: 19F3A656537 X-Spamd-Result: default: False [0.09 / 15.00]; HAS_REPLYTO(0.00)[aur-dev@lists.archlinux.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:5.9.250.164:c]; R_MISSING_CHARSET(2.50)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[lists.archlinux.org:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[archlinux.org,none]; RCVD_IN_DNSWL_MED(-0.20)[5.9.250.164:from]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:24940, ipnet:5.9.0.0/16, country:DE]; FROM_NEQ_ENVFROM(0.00)[aur-dev@lists.archlinux.org,aur-dev-bounces@lists.archlinux.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[lists.archlinux.org:s=luna]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[archlinux.org:dkim]; TAGGED_RCPT(0.00)[aur-dev]; PREVIOUSLY_DELIVERED(0.00)[aur-dev@lists.archlinux.org]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; NEURAL_HAM(-0.00)[-1.000]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org --- Old patch didn't apply because it had some local changes. web/lib/acctfuncs.inc.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index df016c6d..0d021f99 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -875,10 +875,7 @@ function valid_pgp_fingerprint($fingerprint) { * @return bool True if the SSH public key is valid, otherwise false */ function valid_ssh_pubkey($pubkey) { - $valid_prefixes = array( - "ssh-rsa", "ssh-dss", "ecdsa-sha2-nistp256", - "ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521", "ssh-ed25519" - ); + $valid_prefixes = explode(' ', config_get('auth', 'valid-keytypes')); $has_valid_prefix = false; foreach ($valid_prefixes as $prefix) {