Skip to content

Commit

Permalink
Fixed String Injection
Browse files Browse the repository at this point in the history
  • Loading branch information
racerxdl committed Mar 10, 2019
1 parent 6499b42 commit 48c4d8e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Display/Display.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func InitDisplay() {
}
// endregion
// region HEAD
headStr := fmt.Sprintf("SatHelperApp - %s.%s", SatHelperApp.GetVersion(), SatHelperApp.GetRevision())
headStr := fmt.Sprintf("SatHelperApp - %s", SatHelperApp.GetVersion())
head := ui.NewPar(headStr)
head.TextFgColor = ui.ColorWhite
head.BorderFg = ui.ColorCyan
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PACKAGE := OpenSatelliteProject/SatHelperApp
REV_VAR := SatHelperApp.RevString
VERSION_VAR := SatHelperApp.VersionString
BUILD_DATE_VAR := SatHelperApp.CompilationDate
BUILD_TIME_VAR := SatHelperApp.CompilationTime
PACKAGE := opensatelliteproject/SatHelperApp
REV_VAR := github.com/opensatelliteproject/SatHelperApp.RevString
VERSION_VAR := github.com/opensatelliteproject/SatHelperApp.VersionString
BUILD_DATE_VAR := github.com/opensatelliteproject/SatHelperApp.CompilationDate
BUILD_TIME_VAR := github.com/opensatelliteproject/SatHelperApp.CompilationTime
REPO_VERSION := $(shell git describe --always --dirty --tags)
REPO_REV := $(shell git rev-parse --sq HEAD)
BUILD_DATE := $(shell date +"%b %d %Y")
Expand Down
16 changes: 8 additions & 8 deletions travis-build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash


REV_VAR="SatHelperApp.RevString"
VERSION_VAR="SatHelperApp.VersionString"
BUILD_DATE_VAR="SatHelperApp.CompilationDate"
BUILD_TIME_VAR="SatHelperApp.CompilationTime"
REV_VAR="github.com/opensatelliteproject/SatHelperApp.RevString"
VERSION_VAR="github.com/opensatelliteproject/SatHelperApp.VersionString"
BUILD_DATE_VAR="github.com/opensatelliteproject/SatHelperApp.CompilationDate"
BUILD_TIME_VAR="github.com/opensatelliteproject/SatHelperApp.CompilationTime"
REPO_VERSION=$(git describe --always --dirty --tags)
REPO_REV=$(git rev-parse HEAD)
BUILD_DATE=$(date +"%b %d %Y")
BUILD_TIME=$(date +"%H:%M:%S")
GOBUILD_VERSION_ARGS="-ldflags \"-X ${REV_VAR}='${REPO_REV}' -X ${VERSION_VAR}='${REPO_VERSION}' -X ${BUILD_DATE_VAR}='${BUILD_DATE}' -X ${BUILD_TIME_VAR}='${BUILD_TIME}'\""
BUILD_DATE=$(date +"%d%m%Y")
BUILD_TIME=$(date +"%H%M%S")
GOBUILD_VERSION_ARGS="-ldflags \"-X '${REV_VAR}=${REPO_REV}' -X '${VERSION_VAR}=${REPO_VERSION}' -X '${BUILD_DATE_VAR}=${BUILD_DATE}' -X '${BUILD_TIME_VAR}=${BUILD_TIME}'\""


echo "REV_VAR=${REV_VAR}"
Expand Down Expand Up @@ -70,7 +70,7 @@ then
echo "Building $i"
cd ${i}
echo go build ${GOBUILD_VERSION_ARGS} -o ../../bins/${i}
go build ${GOBUILD_VERSION_ARGS} -o ../../bins/${i}
bash -c "go build ${GOBUILD_VERSION_ARGS} -o ../../bins/${i}"
echo "Zipping ${i}-${TAG}-linux-amd64.zip"
zip -r "../../zips/${i}-${TAG}-linux-amd64.zip" ../../bins/$i
cd ..
Expand Down

0 comments on commit 48c4d8e

Please sign in to comment.