From patchwork Wed Apr 7 09:07:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonidas Spyropoulos X-Patchwork-Id: 1895 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.17) for (single-drop); Wed, 07 Apr 2021 09:14:19 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id Z69/C+t3bWDpWAUAK+/4rw (envelope-from ) for ; Wed, 07 Apr 2021 09:14:19 +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 ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 824984D6C37; Wed, 7 Apr 2021 09:14:18 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 2B1642C600; Wed, 7 Apr 2021 09:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.archlinux.org; s=luna; t=1617786858; bh=WTBg+q1hIVK/fJIZ1vmLtiWINXO7p6ccXncuh0CpfxU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc; b=XYHNw4cK8teW69kw7brtEi0e1Zj5MsG9dQSysRpFYJ5HEuPwmgTcH4I1VFiw5ji0f 31tdfqWiss0E1T7AsW9I7HwQiTY2SSavajEQR1qaOfzB+UdihuJty/MNh0o03m9Ia/ owNF5xm1O2YqO6MZPPgHsGtbfMz0wqyhFoGAcxBuciBPftfwffir3M1wF8xPLVjfxs wspBQcuwfTYuEYfQP6+f28Dj5C/ZGH5PNJUvFLavhQu7JEG/1CtHVKZ8H2zdA7jLmy e8WY4TXu/Qf9R+vmff3vEJHgHV4MlNhslJdcsalpNwppbMlMaM5WH5lT2unMq398c7 +OyudfbPfVTY/sV0CRoSv8r3+rVoWBNneNBHrOiLwMS/EKZpgELVkJTu7lqkgbwXys Pc15SPdflTuGEIvpX1iJmdfSfnuMoSW94Qe77h2TpP4eow4Y5O2C6c9+JyEXqaKX3j OFrZCdmxJIXUWAQbmd/F/eUcaJ5/1bdXT7u20FOEjM02hO3IBJKezx40Cjj07F0rhE crP8L4Lj0VgSf8jKpKHakWLYBJXLvlk6au5jF+mOM4rwpFn6q7sJ61UB+pSLpw6oXq 9RUa5uVgofFCEi9UNHlbdbekP+hpoS1kheyf+khhFXnReIJ9CuM6497TLv6WQZKaho 58WsQzt6849Mw3xvMzOc1Xk8= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id F24212C5FF for ; Wed, 7 Apr 2021 09:14:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FROM=0.5, RCVD_IN_DNSWL_MED=-2.3,T_DMARC_POLICY_NONE=0.01, T_DMARC_SIMPLE_DKIM=0.01 autolearn=failed autolearn_force=no version=3.4.5 X-Spam-BL-Results: [127.0.9.2] Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Wed, 7 Apr 2021 09:14:12 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 1C99D4D6C36 for ; Wed, 7 Apr 2021 09:14:12 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id d12so27309212lfv.11 for ; Wed, 07 Apr 2021 02:14:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=489eOp2r3wmlCTqftW3vDB6TEKwGF/gVKaoHMTct5B4=; b=m40JV8gUU8ThE2mKZyZLw9NOhTKcW/AizyE/tcradxfm2YpjTGRvw9d4W0pnjb08Rg gaaYAcRYxRUXAZjPSu/QRI8gJondmZANWwJfVw1IJePswiLGAAd0dBGlmr7+fzHEG9HO v61HDnWOVZVbtjCr2fV8vN4X3bp39EN7Lzf9pANc4cPsu/EcU11zf88PbeUAUk1a9/Wn GLjigTtW9LXjf+xXzItqSXz/2RzUGLd/DuPnbnvGozGnpbaWHOqUafcfZ6qNMXN2/vMU J07d8P3puiW7XpVXjpU9AuK3HLqqU3T9Dt5VFmb8UoFQiaR8yTdAZjDbC5TXo9cNrOM/ mUYg== X-Gm-Message-State: AOAM532U6sLTNYuGAHz3sPbP3sjc2mq0tvREQSWnGVpgmzPP3GpxJ63r w5FtdT65n/+v1NPwr2sV63+YHKbJw0fCjQ== X-Google-Smtp-Source: ABdhPJzTGhg5O4xcM9iKns+l3JNw6uVZuy4UNSVz/67NVR7zNTTB+Flh4OKMR0gAXfiGFJBV2ZU/7Q== X-Received: by 2002:adf:f512:: with SMTP id q18mr3091599wro.167.1617786475920; Wed, 07 Apr 2021 02:07:55 -0700 (PDT) Received: from tiamat.. ([141.0.156.136]) by smtp.gmail.com with ESMTPSA id x14sm37649211wrw.13.2021.04.07.02.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 02:07:55 -0700 (PDT) To: aur-dev@archlinux.org Subject: [PATCH] Filter out current username from co-maintainers list. Date: Wed, 7 Apr 2021 10:07:24 +0100 Message-Id: <20210407090724.68221-1-artafinde@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 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: Leonidas Spyropoulos via aur-dev From: Leonidas Spyropoulos Reply-To: "Arch User Repository \(AUR\) Development" Cc: Leonidas Spyropoulos 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=XYHNw4cK; 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: 824984D6C37 X-Spamd-Result: default: False [2.79 / 15.00]; HAS_REPLYTO(0.00)[aur-dev@lists.archlinux.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; R_SPF_ALLOW(-0.20)[+ip4:5.9.250.164]; REPLYTO_ADDR_EQ_FROM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; DKIM_TRACE(0.00)[lists.archlinux.org:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[archlinux.org,none]; MAILLIST(-0.20)[mailman]; 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)[]; TAGGED_RCPT(0.00)[aur-dev]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; NEURAL_HAM(-0.00)[-1.000]; FREEMAIL_CC(0.00)[gmail.com]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_SEVEN(0.00)[7] X-Rspamd-Server: mail.archlinux.org Closes: #8 Signed-off-by: Leonidas Spyropoulos --- web/html/pkgbase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index b716644c..e99ea0c8 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -116,7 +116,8 @@ if (check_token()) { } elseif (current_action("do_CloseRequest")) { list($ret, $output) = pkgreq_close($_POST['reqid'], $_POST['reason'], $_POST['comments']); } elseif (current_action("do_EditComaintainers")) { - list($ret, $output) = pkgbase_set_comaintainers($base_id, explode("\n", $_POST['users'])); + list($ret, $output) = pkgbase_set_comaintainers($base_id, array_diff(array_map('trim', explode("\n", $_POST['users'])), + array(username_from_id(uid_from_sid($_COOKIE["AURSID"]))))); } elseif (current_action("do_AddComment")) { $uid = uid_from_sid($_COOKIE["AURSID"]); list($ret, $output) = pkgbase_add_comment($base_id, $uid, $_REQUEST['comment']);