From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web09.32908.1634541712304376999 for ; Mon, 18 Oct 2021 00:22:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=IupHIg68; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=092584ce40=gary.lin@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19HM22Xg004480; Mon, 18 Oct 2021 07:21:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=8pMedQbPdLZQEOGCApn4n+e1y78065s4yF14iM0bGFw=; b=IupHIg68THA8LEYPbrIapunkreDMN4PkCFb6jF8Xjh2owbYOelYmYlpSr/KcLon3hd3T 9xl7pJprx8Xmgr+tK2Tgt9uxT1GZcIl7JzlpD+qhyQmdy8RnL2ljrJ1Vm5iwJejQhJsd C+/auqsvuR6e+bufn5LbIXq5sL5EyWy1NeKXIgTZ/nsUeqmoJj7naMxjLgehdwvDo9pa 4MLwEwFkGsIIQWzO6IzuIKapNpy9IxTqrmQOBb8OaojeKLu7mbg4nY3SHR78WRiVp2z2 TcEGVLgGHGTZRfXeb5CeciVd3ndxJoWRow277aLDnDlZG2SWRKXoUxsqOAZLbRuULHJm PQ== Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3brgxjddwa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Oct 2021 07:21:51 +0000 Received: from G9W9209.americas.hpqcorp.net (g9w9209.houston.hpecorp.net [16.220.66.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id B364171; Mon, 18 Oct 2021 07:21:50 +0000 (UTC) Received: from G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) by G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 18 Oct 2021 07:21:50 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (15.241.52.13) by G9W9209.americas.hpqcorp.net (16.220.66.156) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Mon, 18 Oct 2021 07:21:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SU/aT/nSzEfRPvvJvxfg9D2QOsdYxqVy4PT/JI+jlDZXwKob2z4J64QSq10B2ssbC+GaWPWUwll89E9cyvY2I9OVrqcxzztBucc/A033n5Rw1QAyGpWtXhFzVXUsOtyj+paO86UN80Vp8Qx8ZsQqe0TgDnJlZWHtIi71IAR1fPM6S50tigEBl35/uPrV3iEirrB7b8ssX5Pl8DSuMndu/8PAHPN/kpmauK0+T7hQFXd4D/KlYsS/ZWFgw3Am7vFySH7eqCcn4jC7X9baInmqhtIN8ZIdhATNStbax0P881xwaOt/vwBlVP0JNIn0ololNYFj0DEHv2vK7N/5eEMvag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8pMedQbPdLZQEOGCApn4n+e1y78065s4yF14iM0bGFw=; b=ecqLHMAAJDmdxjrBNyNAl5Hni2GiolruZZRCc/n/ivCaVy6n5jo1f7z7SQ+WEAfK6ZmwgIvtmbeKWVJDV9HRcmTLjksYZFnZusLUZ3st58bbxR0Gu2EK35zlYoOZK8MFJY+O/oiwBoBZwpf+DZSArW1S78XpVe3Odyc9PjYUwNdptumQM4bClPnYaCalgl7T5/Si8ODGirH+Oda+MQ03qL75oeb5HhAJ0nffkRnnN7IUpBRWQA/jiQCrEc+tsVo/euK2tTW/OEx10t8itSEOsx7lvTyAKoKq4oki4NU5tgjxzynJ68uEdMg9eqEFUaUGAMPuN652s3GSxb8tGJPV5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) by AT5PR8401MB0755.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:742a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17; Mon, 18 Oct 2021 07:21:48 +0000 Received: from AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM ([fe80::f1dd:130f:fbb0:d849]) by AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM ([fe80::f1dd:130f:fbb0:d849%11]) with mapi id 15.20.4608.018; Mon, 18 Oct 2021 07:21:48 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Maciej Rabeda , Jiaxin Wu , Siyuan Fu Subject: [PATCH 1/1] NetworkPkg/HttpBootDxe: make file extension check case-insensitive Date: Mon, 18 Oct 2021 15:21:43 +0800 Message-ID: <20211018072143.14726-1-gary.lin@hpe.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: SN7PR04CA0024.namprd04.prod.outlook.com (2603:10b6:806:f2::29) To AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) Received: from localhost (111.240.133.240) by SN7PR04CA0024.namprd04.prod.outlook.com (2603:10b6:806:f2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Mon, 18 Oct 2021 07:21:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a173cfd9-0a6b-4ecb-daf1-08d99207f29e X-MS-TrafficTypeDiagnostic: AT5PR8401MB0755: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9ySXaiR1Is61MBsC5PIEue0uOaTxFHs/wo5hTU4L16Gn/w+XiTd+acUNiH1IxkT7tzlawIvg17prhU3VcuTc+Pqk4UO1PTnZAuprMW13zVCVUJyiIouD2qzaOj0s2WGGVQT8LP9CTsOYs1Y/FWaPGs5ptTAuCasJUS/vRjLcn5wQ8kLEoSQH6SM2f3V3xxepF/LJ/RSHAVHN9obcvIbxkkrPFDb/dTLIx7H2kT9RmHuxkM7LSjb68KDe3I5HNvJt658lnoPIpAhbUC2T2b8tYdK7uCu6tS64IpPyZ0YAfyhTgKumH6pVQAL8GVKmGFX29iEupj5lUEMJHcQ4ODbeOxip7C6XO5pXPkPhCySxKm+wgfcw1gd6V1tXPBTkr/Rq58sq/x159symQda2WMDKOxFJD07eqbCY2+a/jL33YOC14C7iytFaUKZOv6zjZTJWOQrKgzD/XymBTH0zr3oklaQCWeF0PMSDtU1yT+DKlWNEGjfrAJuLYQDlYOLNzrJoRy2gmzLetP9yb7q8nWbMhKp0FYy+m/Vh7R25XqY8Jd2l2vUsNlLWaAasgmIDwfkJMBsh7LFyAfPJEnzvytxysykpP4z+W4BbClYn5ww68Ckt7mYrBJzeAYJpgJxEbf6jxyBQqEjtxSOzMq5YYVODOYB6gmlzmbXhVPiwR/MZW8ChHvfP20xmvMskpEDDvj5XW9FCSYLVUjL71c7JWaqeflmd5bcI/+uhZ9zXSpMYPKA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(83380400001)(186003)(66556008)(54906003)(66946007)(26005)(66476007)(5660300002)(2616005)(44832011)(6666004)(956004)(1076003)(6486002)(966005)(6496006)(316002)(38100700002)(8936002)(82960400001)(36756003)(8676002)(4326008)(86362001)(6916009)(508600001)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bxUuDOJRWhrxwK6Eeq/kYSzTaWeJ1oQ62qHixIqsbRnplXis3ZcVvLLVSaUg?= =?us-ascii?Q?qg+XuEOBY5utU9l325TkZJPEyJ3WYcQBhNHji5XaZDWHrq3pYT8lzetoAxCV?= =?us-ascii?Q?XCkM0xvfmvxkwbx1BmJAtNZdacRZGjbUFUoXik1EMG7Cy2ulM/U6md/hPFnV?= =?us-ascii?Q?WiDWv3kKC4uPmZm4ijofuKxZ7/PVh1Zlne0QLmDDqBIz5SuTXQus4Macx6ge?= =?us-ascii?Q?4D4GBbEe3QcKHfnwYlosKwbxI0q++ycaJ5C+kcM1Mkvl3WBCEdnsLk+5IVqE?= =?us-ascii?Q?OZtgP5qISysQtVwiXnTEL9wB9Z7L75BDFdvFMApPldUIUN6Vs0uMPG87nyo3?= =?us-ascii?Q?1219F0nozoDvqvboGNg+Dt5BuEhrOuY/3SEVNevxWn3YsYRG8Xq5ooJwlMw/?= =?us-ascii?Q?RSj+4g4YI4WgA8dQwPcNheKUeKVGjfNM4FbbUMTooAVBjadeaB1kyxq9wI7a?= =?us-ascii?Q?5aMxeAcBnbX0DfYZZN53rodfE4rm/whvKOt9Bg1lWRCwrQykchnG0esqlbtV?= =?us-ascii?Q?pUVXwgVK5CpSN+xdpRuKzetdoz4+wpylvorlqsYVL4Qrm8kqm354Y1+NPw5d?= =?us-ascii?Q?v5OEv/It4nwTbbNZ2Rdd9kyrcCLamXYaNWK6qLm0GeaBeyLxrdnWyuOdgp2B?= =?us-ascii?Q?LpQmvHoQKIF9zEbPOJSO+dnb68JqxYwybLjo6qfBnQBOlhyW/tXmeNQwL6+K?= =?us-ascii?Q?T9kJ3fnXsMRvg0DMM8lvT/KOJwRhOPRykjSzCjt6Pr8gmMucUmZkHDJq79wy?= =?us-ascii?Q?ZqeNztsw9v0STncGvYY8+DSYJJAOSANAG2nj073VkO3epYLh2PB33JDLPiM6?= =?us-ascii?Q?CKHlpTCqdJ0bFQyug2703UO7hgcu0eqw/mSJOMc5ZZhY9YqCVq8PZxJ2eaiv?= =?us-ascii?Q?J7D/vgH5We5OwvP/osGj82CwNlGlgwilQXLbVA8gpeE0wOakyKikejLpHkX+?= =?us-ascii?Q?qW0iqL2S6eirbmDDymdx3zadjdgNgrrGND8XgS3RmBKpd6JXK+HPGO6HfD+Y?= =?us-ascii?Q?V7rgmsThOiEwzgDcNDNwbqqWx5oBaIAOz7gHMBl99xxhvm1ZeiPePBe6pa3n?= =?us-ascii?Q?hOeoLImAl4y5mqrR3ohOCpaSiFc1Sgu9yGl5oM26zlcHb3VUQjSaARbSGMjK?= =?us-ascii?Q?oO5kqmegwXcpMquI/GdRVEBr7S2l0OG6hzwPrPx0lqF56cQOS5/gmO24ar3R?= =?us-ascii?Q?5YLBzw+FjDuRu+jykxt/Zk4INN2qutL55V3ab3uUav5D+mqp1GGHz3BI6PyA?= =?us-ascii?Q?Pyncy+DjXQdUz5z0QmPv4r1v9Q/udxnjKtYMGtEj4SUChqMj/dKrtRfoQEvm?= =?us-ascii?Q?mIDdGKwJJKNsBfMAqYLTZ8I9?= X-MS-Exchange-CrossTenant-Network-Message-Id: a173cfd9-0a6b-4ecb-daf1-08d99207f29e X-MS-Exchange-CrossTenant-AuthSource: AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2021 07:21:48.5348 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u6F/u2mKJhUCrob7//kx4Jvm8GX/e8Uk5QoUQ4tOTJ7W1AlWqjmpjzZwxHcd1np2/2YA2k0iARwhG4ULHtOSPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB0755 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: YVVZarXQr62ybf3WTMDL7KwwNHDcK3ju X-Proofpoint-GUID: YVVZarXQr62ybf3WTMDL7KwwNHDcK3ju X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_02,2021-10-14_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 clxscore=1011 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110180045 Content-Type: text/plain Content-Transfer-Encoding: 8bit https://bugzilla.tianocore.org/show_bug.cgi?id=3694 HttpBootCheckImageType() was using the case-sensitive AsciiStrCmp() to check the file extensions and this could reject the images with upper-case file names. Using the case-insensitive AsciiStriCmp() to avoid the issue. Cc: Maciej Rabeda Cc: Jiaxin Wu Cc: Siyuan Fu Signed-off-by: Gary Lin --- NetworkPkg/HttpBootDxe/HttpBootSupport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c index 37a95e031e9c..a91411db7d1b 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c @@ -681,11 +681,11 @@ HttpBootCheckImageType ( } FilePost = FilePath + AsciiStrLen (FilePath) - 4; - if (AsciiStrCmp (FilePost, ".efi") == 0) { + if (AsciiStriCmp (FilePost, ".efi") == 0) { *ImageType = ImageTypeEfi; - } else if (AsciiStrCmp (FilePost, ".iso") == 0) { + } else if (AsciiStriCmp (FilePost, ".iso") == 0) { *ImageType = ImageTypeVirtualCd; - } else if (AsciiStrCmp (FilePost, ".img") == 0) { + } else if (AsciiStriCmp (FilePost, ".img") == 0) { *ImageType = ImageTypeVirtualDisk; } else { *ImageType = ImageTypeMax; -- 2.31.1