git: bf01a5962c27 - 2024Q3 - security/keepass-plugin-keepassrpc: update 1.8.0 → 2.0.2 (CVE-2020-16271) and take maintainership

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Fri, 19 Jul 2024 01:39:08 UTC
The branch 2024Q3 has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bf01a5962c27f3b06efd0747bd1ab375b5bea457

commit bf01a5962c27f3b06efd0747bd1ab375b5bea457
Author:     gatekeeper <tiago.gasiba@gmail.com>
AuthorDate: 2024-07-19 01:22:15 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-19 01:38:28 +0000

    security/keepass-plugin-keepassrpc: update 1.8.0 → 2.0.2 (CVE-2020-16271) and take maintainership
    
    Changelogs:
    https://forum.kee.pm/t/release-notes-keepassrpc-1-9-0/2345
    https://github.com/kee-org/keepassrpc/releases/tag/v1.10.0
    https://github.com/kee-org/keepassrpc/releases/tag/v1.11.0
    https://github.com/kee-org/keepassrpc/releases/tag/v1.12.0
    https://github.com/kee-org/keepassrpc/releases/tag/v1.12.1
    https://github.com/kee-org/keepassrpc/releases/tag/v1.13.0
    https://github.com/kee-org/keepassrpc/releases/tag/v1.14.0
    https://github.com/kee-org/keepassrpc/releases/tag/v1.15.0
    https://github.com/kee-org/keepassrpc/releases/tag/v1.15.1
    https://github.com/kee-org/keepassrpc/releases/tag/v1.16.0
    https://github.com/kee-org/keepassrpc/releases/tag/v2.0.0
    https://github.com/kee-org/keepassrpc/releases/tag/v2.0.1
    https://github.com/kee-org/keepassrpc/releases/tag/v2.0.2
    
    Security:
    https://forum.kee.pm/t/a-critical-security-update-for-keepassrpc-is-available/3040
    https://forum.kee.pm/t/cve-2020-16271-warning-message/3143
    
    PR:     280357
    MFH:    2024Q3
    (cherry picked from commit e34f6550a701b73f476a8f75d400df323620253b)
---
 security/keepass-plugin-keepassrpc/Makefile        | 13 +++--
 security/keepass-plugin-keepassrpc/distinfo        |  6 +-
 .../files/patch-KeePassRPC_KeePassRPC.csproj       | 65 +++++++++++++++++-----
 3 files changed, 60 insertions(+), 24 deletions(-)

diff --git a/security/keepass-plugin-keepassrpc/Makefile b/security/keepass-plugin-keepassrpc/Makefile
index 6ba09441668e..4b1b44503c1a 100644
--- a/security/keepass-plugin-keepassrpc/Makefile
+++ b/security/keepass-plugin-keepassrpc/Makefile
@@ -1,18 +1,18 @@
 PORTNAME=	keepassrpc
-PORTVERSION=	1.8.0
+PORTVERSION=	2.0.2
 DISTVERSIONPREFIX=v
-PORTREVISION=	2
 CATEGORIES=	security
 PKGNAMEPREFIX=	keepass-plugin-
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	tiago.gasiba@gmail.com
 COMMENT=	KeePass plugin which facilitates the Kee Firefox plugin
 WWW=		https://www.kee.pm/
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	keepass>0:security/keepass
+BUILD_DEPENDS=	keepass>0:security/keepass \
+		msbuild:devel/msbuild
 LIB_DEPENDS=	libgdiplus.so:x11-toolkits/libgdiplus
 
 USES=		cpe mono
@@ -20,8 +20,8 @@ CPE_VENDOR=	kee
 USE_GITHUB=	yes
 GH_ACCOUNT=	kee-org
 
-NO_ARCH=	yes
 DATADIR=	${PREFIX}/share/keepass/Plugins
+NO_ARCH=	yes
 
 OPTIONS_DEFINE=	DEBUG
 DEBUG_VARS=	config=Debug
@@ -29,12 +29,13 @@ DEBUG_VARS_OFF=	config=Release
 
 do-build:
 	(cd ${WRKSRC} && \
-		${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/xbuild /t:KeePassRPC /p:Configuration=${CONFIG})
+		${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/msbuild /t:KeePassRPC /p:Configuration=${CONFIG})
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${DATADIR}
 	(cd ${WRKSRC}/KeePassRPC/bin/${CONFIG} && \
 		${RM} ./KeePass.exe && \
+		${RM} ./KeePass.exe.config && \
 		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
 
 .include <bsd.port.mk>
diff --git a/security/keepass-plugin-keepassrpc/distinfo b/security/keepass-plugin-keepassrpc/distinfo
index 3eaedd8e6f9e..eb6b02ca6c68 100644
--- a/security/keepass-plugin-keepassrpc/distinfo
+++ b/security/keepass-plugin-keepassrpc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1549286066
-SHA256 (kee-org-keepassrpc-v1.8.0_GH0.tar.gz) = aaa91cb93f89c32d92e26fecc379db9b5604db82350f75ec33ec5fe97a0c8686
-SIZE (kee-org-keepassrpc-v1.8.0_GH0.tar.gz) = 3986474
+TIMESTAMP = 1721341251
+SHA256 (kee-org-keepassrpc-v2.0.2_GH0.tar.gz) = 49e009dd20291a11ef53417329d018ef833eaee290c3e7ca0dc38e9900d6d925
+SIZE (kee-org-keepassrpc-v2.0.2_GH0.tar.gz) = 3869344
diff --git a/security/keepass-plugin-keepassrpc/files/patch-KeePassRPC_KeePassRPC.csproj b/security/keepass-plugin-keepassrpc/files/patch-KeePassRPC_KeePassRPC.csproj
index bd75a37d91b6..a24b6cd7155d 100644
--- a/security/keepass-plugin-keepassrpc/files/patch-KeePassRPC_KeePassRPC.csproj
+++ b/security/keepass-plugin-keepassrpc/files/patch-KeePassRPC_KeePassRPC.csproj
@@ -1,18 +1,53 @@
---- KeePassRPC/KeePassRPC.csproj.orig	2017-12-16 23:19:07 UTC
+--- KeePassRPC/KeePassRPC.csproj.orig	2024-06-12 18:29:35 UTC
 +++ KeePassRPC/KeePassRPC.csproj
-@@ -105,7 +105,7 @@
-     <Reference Include="KeePass, Version=2.1.8.29009, Culture=neutral, PublicKeyToken=7952fc8ece49a093, processorArchitecture=MSIL">
-       <SpecificVersion>False</SpecificVersion>
-       <ExecutableExtension>.exe</ExecutableExtension>
--      <HintPath>..\..\..\..\Program Files (x86)\KeePass Password Safe 2 DEV\KeePass.exe</HintPath>
-+      <HintPath>/usr/local/share/keepass/KeePass.exe</HintPath>
+@@ -113,7 +113,7 @@
+     <Reference Include="System.Xml" />
+     <Reference Include="KeePass">
+       <HintPath Condition="'$(OS)' == 'Windows_NT'">$(USERPROFILE)\KeePassDEV\KeePass.exe</HintPath>
+-      <HintPath Condition="'$(OS)' != 'Windows_NT'">$(home)/keepass-dev/KeePass.exe</HintPath>
++      <HintPath Condition="'$(OS)' != 'Windows_NT'">/usr/local/share/keepass/KeePass.exe</HintPath>
      </Reference>
-     <Reference Include="System" />
-     <Reference Include="System.Configuration" />
-@@ -385,4 +385,4 @@
-       :BuildEventOK
-       echo POSTBUILDSTEP for $(ProjectName) COMPLETED OK</PostBuildEvent>
+   </ItemGroup>
+   <ItemGroup>
+@@ -478,38 +478,12 @@
    </PropertyGroup>
--</Project>
-\ No newline at end of file
-+</Project>
+   <PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
+     <PostBuildEvent>
+-      #!/bin/bash
+-      echo POSTBUILDSTEP for $(ProjectName)
+-
+-      export KPDir="${HOME}/keepass-dev/"
+-      export KPPDir=${KPDir}Plugins/
+-      export KPPTempDir="${KPPDir}$(ProjectName)"
+-            
+-      # delete the PLGX from any previous ReleasePLGX build
+-      rm -f "${KPPDir}$(ProjectName).plgx"
+-      if [ $? = 1 ]; then echo POSTBUILDSTEP for $(ProjectName) FAILED; exit 1; fi
+-      echo Release plgx deleted
+-
+-      # copy output DLLs to KeePass plugins directory
+-      cp "$(ProjectName).dll" "${KPPDir}$(ProjectName).dll"
+-      cp "$(ProjectName).pdb" "${KPPDir}$(ProjectName).pdb"
+-      
+-      if [ $? = 1 ]; then echo POSTBUILDSTEP for $(ProjectName) FAILED; exit 1; fi
+-            
+-      cp "Jayrock.dll" "${KPPDir}Jayrock.dll"
+-      cp "Jayrock.Json.dll" "${KPPDir}Jayrock.Json.dll"
+-      cp "Fleck2.dll" "${KPPDir}Fleck2.dll"
+-      cp "DomainPublicSuffix.dll" "${KPPDir}DomainPublicSuffix.dll"
+-      
+-      if [ $? = 1 ]; then echo POSTBUILDSTEP for $(ProjectName) FAILED; exit 1; fi
+-            
+-      echo Debug DLLs copied to plugins directory
+-
+-      echo POSTBUILDSTEP for $(ProjectName) COMPLETED OK</PostBuildEvent>
++      #!/bin/sh
++      echo POSTBUILDSTEP for $(ProjectName): COMPLETED OK</PostBuildEvent>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(OS)' != 'Windows_NT' AND '$(ConfigurationName)' == 'ReleasePLGX'">
+     <PostBuildEvent>
+-      #!/bin/bash
++      #!/usr/local/bin/bash
+       echo POSTBUILDSTEP for $(ProjectName)
+ 
+       export KPDir="${HOME}/keepass-dev/"