From commits-return-120678-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Fri Jan 22 21:36:30 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 4D08A180638 for ; Fri, 22 Jan 2021 22:36:30 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 725D644719 for ; Fri, 22 Jan 2021 21:36:29 +0000 (UTC) Received: (qmail 48459 invoked by uid 500); 22 Jan 2021 21:36:29 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 48450 invoked by uid 99); 22 Jan 2021 21:36:29 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2021 21:36:29 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D442D81FE6; Fri, 22 Jan 2021 21:36:28 +0000 (UTC) Date: Fri, 22 Jan 2021 21:36:27 +0000 To: "commits@lucene.apache.org" Subject: [lucene-solr] branch branch_8x updated: SOLR-15073: Fix ClassCastException in SystemInfoHandler.getSecurityInfo. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <161135138683.11191.13721043145757594969@gitbox.apache.org> From: cpoerschke@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: lucene-solr X-Git-Refname: refs/heads/branch_8x X-Git-Reftype: branch X-Git-Oldrev: f78e23b4b82d597f228be0c02ffae59ca48079ac X-Git-Newrev: 315f26fd70f9a2d254e7ef80fc317276497afe7b X-Git-Rev: 315f26fd70f9a2d254e7ef80fc317276497afe7b X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. cpoerschke pushed a commit to branch branch_8x in repository https://gitbox.apache.org/repos/asf/lucene-solr.git The following commit(s) were added to refs/heads/branch_8x by this push: new 315f26f SOLR-15073: Fix ClassCastException in SystemInfoHandler.getSecurityInfo. 315f26f is described below commit 315f26fd70f9a2d254e7ef80fc317276497afe7b Author: Christine Poerschke AuthorDate: Fri Jan 22 18:33:28 2021 +0000 SOLR-15073: Fix ClassCastException in SystemInfoHandler.getSecurityInfo. Same fix as the #2210 PR commit earlier but this time not extending SystemInfoHandlerTest and also not adding a static SystemInfoHandler.getSecurityInfo variant for test use. --- solr/CHANGES.txt | 2 ++ solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index c4c48e5..60ba68c 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -170,6 +170,8 @@ Bug Fixes * SOLR-15070: Suggester requests made with SolrJ can now use XMLResponseParser (Jason Gerlowski) +* SOLR-15073: Fix ClassCastException in SystemInfoHandler.getSecurityInfo. (Nikolay Ivanov, Christine Poerschke) + * SOLR-15071: Fix ArrayIndexOutOfBoundsException in contrib/ltr SolrFeatureScorer. (Florin Babes, Ovidiu Mihalcea, David Smiley, Christine Poerschke) diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java index 9c4828c..0440e10 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java @@ -341,7 +341,7 @@ public class SystemInfoHandler extends RequestHandlerBase // Mapped roles for this principal @SuppressWarnings("resource") AuthorizationPlugin auth = cc==null? null: cc.getAuthorizationPlugin(); - if (auth != null) { + if (auth instanceof RuleBasedAuthorizationPluginBase) { RuleBasedAuthorizationPluginBase rbap = (RuleBasedAuthorizationPluginBase) auth; Set roles = rbap.getUserRoles(req.getUserPrincipal()); info.add("roles", roles);