Skip to content

Commit

Permalink
Merge pull request #11 from medizininformatik-initiative/change-obfus…
Browse files Browse the repository at this point in the history
…cation

change obfuscation to +-5 and return 0 if < 5 after obfuscation
  • Loading branch information
juliangruendner authored Jul 12, 2022
2 parents 83ee55d + 9cfbdeb commit e1004a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ echo "----END REQUEST----" >> aktin-requests.log

RESP=$(sh execute-cql.sh "$QUERY_INPUT")

if [ $CLIENT_OBFUSCATE = true ]; then
if [ $RESP != 0 ];then
RESP=$(($RESP - ($RESP % 10) + 10))
if [ "$CLIENT_OBFUSCATE" = true ]; then
OBFUSCATION_INTEGER=$(($RANDOM % 11 - 5))
RESP=$(($RESP + $OBFUSCATION_INTEGER))
if [ $RESP -lt 5 ]; then
RESP=0
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ RESP=$(curl --location --request POST "$FLARE_BASE_URL/query/execute" \
--header 'Content-Type: application/sq+json' \
--data-raw "$QUERY_INPUT")

if [ $CLIENT_OBFUSCATE = true ]; then
if [ $RESP != 0 ];then
RESP=$(($RESP - ($RESP % 10) + 10))
if [ "$CLIENT_OBFUSCATE" = true ]; then
OBFUSCATION_INTEGER=$(($RANDOM % 11 - 5))
RESP=$(($RESP + $OBFUSCATION_INTEGER))
if [ $RESP -lt 5 ]; then
RESP=0
fi
fi

Expand Down

0 comments on commit e1004a6

Please sign in to comment.