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 } 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 diff --git a/LICENSE b/LICENSE index ce0a1537..2e9dd663 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 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 diff --git a/VERSION b/VERSION index 26d99a28..ce7f2b42 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.2.1 +5.2.2 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);