libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 7be61e5457e17a6f9626137b7d5d0beb8e8b37ec
parent 90db87fff2b98a1c2cfa7ec8ed6e353fbf288c5d
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Sat,  7 Dec 2019 04:24:35 +0100

address information leak

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -155,7 +155,7 @@ fun main() { bankCustomer = customerEntity } - for (i in IntRange(0, 4) + IntRange(6, 10)) { + for (i in listOf(1, 3, 9, 10)) { BankTransactionEntity.new { counterpart = "IBAN" amount = Amount(5 - i) @@ -207,9 +207,12 @@ fun main() { val ret = CustomerHistoryResponse() transaction { + val customer = findCustomer(call.parameters["id"]) BankTransactionEntity.find { - BankTransactionsTable.date.between(startDate, endDate) + BankTransactionsTable.localCustomer eq customer.id and + BankTransactionsTable.date.between(startDate, endDate) + }.forEach { ret.history.add( CustomerHistoryResponseElement( @@ -242,7 +245,7 @@ fun main() { call.respond( CustomerBalance( name = name, - balance = "EUR:${balance}" + balance = "${balance} EUR" ) )