From baac7b2eb3a66e7046dfcf729e56bf31435aca1b Mon Sep 17 00:00:00 2001 From: zachmann Date: Mon, 2 Sep 2024 10:56:35 +0200 Subject: [PATCH 1/6] version bump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 26d99a28..ce7f2b42 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.2.1 +5.2.2 From a94e445aeb999056322c883b3a22a34d39e017ab Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 4 Sep 2024 16:25:41 +0200 Subject: [PATCH 2/6] fix name of SCC --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index ce0a1537..23301987 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 - 2024 Karlsruhe Institute of Technology - Steinbuch Centre for Computing +Copyright (c) 2017 - 2024 Karlsruhe Institute of Technology - Scientific Computing Centre Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From f92e1cc17822788d43069c5fe0a07d9490a3b3b4 Mon Sep 17 00:00:00 2001 From: Gabriel Zachmann Date: Wed, 4 Sep 2024 16:39:42 +0200 Subject: [PATCH 3/6] center --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 23301987..2e9dd663 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 - 2024 Karlsruhe Institute of Technology - Scientific Computing Centre +Copyright (c) 2017 - 2024 Karlsruhe Institute of Technology - Scientific Computing Center Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 8f4ab12af49cc4ae0e7471026ef562d828155dad Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 4 Sep 2024 18:33:23 +0200 Subject: [PATCH 4/6] Escape the version before using it --- .gitlab-ci-scripts/set-prerelease-version.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci-scripts/set-prerelease-version.sh b/.gitlab-ci-scripts/set-prerelease-version.sh index 144e6760..cbcc2c3d 100755 --- a/.gitlab-ci-scripts/set-prerelease-version.sh +++ b/.gitlab-ci-scripts/set-prerelease-version.sh @@ -58,6 +58,7 @@ PREREL=$(git rev-list --count HEAD ^"$MASTER_BRANCH") # use version file: VERSION=$(cat $VERSION_FILE) +VERSION_ESCAPED=$(echo ${VERSION} | sed s/\\\./\\\\./g); echo $VER PR_VERSION="${VERSION}-${DEVSTRING}${PREREL}" echo "$PR_VERSION" > $VERSION_FILE echo "$PR_VERSION" @@ -72,17 +73,19 @@ TILDE_VERSION="$(echo $PR_VERSION | sed 's/-/~/g')" | head -n 1 \ | cut -d\( -f 2 \ | cut -d\) -f 1) + DEBIAN_VERSION_ESCAPED=$(echo ${DEBIAN_VERSION} | sed s/\\\./\\\\./g); echo $VER NEW_DEB_VERSION="${TILDE_VERSION}-1" - sed s%${DEBIAN_VERSION}%${NEW_DEB_VERSION}% -i debian/changelog + sed s%${DEBIAN_VERSION_ESCAPED}%${NEW_DEB_VERSION}% -i debian/changelog } + # lets see if RPM also needs a version to be set SPEC_FILES=$(ls rpm/*spec) [ -z "${SPEC_FILES}" ] || { - [ -z "${VERSION}" ] || { + [ -z "${VERSION_ESCAPED}" ] || { for SPEC_FILE in $SPEC_FILES; do - grep -q "$VERSION" "$SPEC_FILE" && { # version found, needs update - sed "s/${VERSION}/${TILDE_VERSION}/" -i "$SPEC_FILE" + grep -q "$VERSION_ESCAPED" "$SPEC_FILE" && { # version found, needs update + sed "s/${VERSION_ESCAPED}/${TILDE_VERSION}/" -i "$SPEC_FILE" } done } From b28e204ed5e4eb1365f04a66ccfa39638fd64275 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Fri, 6 Sep 2024 14:17:08 +0200 Subject: [PATCH 5/6] issuerConfig: do not seffault if there is no user-specific issuer config If no issuer.config is present in the config directory, content would be nullptr, and trigger a segmentation fault in updateIssuerConfigFileFormat. If there is no local configuration, there is nothing to update, so skip that. --- src/utils/config/issuerConfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/config/issuerConfig.c b/src/utils/config/issuerConfig.c index 1d8862f5..5d1e7fc4 100644 --- a/src/utils/config/issuerConfig.c +++ b/src/utils/config/issuerConfig.c @@ -271,7 +271,7 @@ static char* updateIssuerConfigFileFormat(char* content) { static void readIssuerConfigs() { char* content = readOidcFile(ISSUER_CONFIG_FILENAME); - if (!isJSONArray(content)) { // old config file + if (content && !isJSONArray(content)) { // old config file content = updateIssuerConfigFileFormat(content); } collectJSONIssuers(content); From 066ed0a51b77b81a61e65cc315701fd5c22d0cfc Mon Sep 17 00:00:00 2001 From: Gabriel Zachmann Date: Fri, 6 Sep 2024 16:09:49 +0200 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 882ea2cd..af231ca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ +## oidc-agent 5.2.2 + +### Bugfixes + +- Fixed a bug where `oidc-agent` would crash due to a segmentation fault if `~/.config/oidc-agent/issuer.config` was not present. + ## oidc-agent 5.2.1 ### Bugfixes