Compare commits
No commits in common. "341f0b9cc8fac3a382481d4db3c9fb3d2854516f" and "b31011b39058ee83ef1a3ee14b610dd9021daee2" have entirely different histories.
341f0b9cc8
...
b31011b390
@ -43,7 +43,7 @@ func (p *asyncRequestParser) GetInput(r any) ([]byte, error) {
|
||||
|
||||
func main() {
|
||||
config.LoadConfig()
|
||||
|
||||
|
||||
var override config.Override
|
||||
var sessionId string
|
||||
var size uint
|
||||
|
@ -32,7 +32,7 @@ func (k KeyInfo) String() string {
|
||||
|
||||
func ToKeyInfo(k []byte, sessionId string) (KeyInfo, error) {
|
||||
o := KeyInfo{}
|
||||
|
||||
|
||||
o.SessionId = sessionId
|
||||
o.Typ = uint8(k[0])
|
||||
k = k[1:]
|
||||
@ -53,7 +53,7 @@ func ToKeyInfo(k []byte, sessionId string) (KeyInfo, error) {
|
||||
k = k[2:]
|
||||
}
|
||||
|
||||
|
||||
|
||||
return o, nil
|
||||
}
|
||||
|
||||
|
@ -253,35 +253,6 @@ func (h *MenuHandlers) ResetValidPin(ctx context.Context, sym string, input []by
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// CheckBlockedStatus resets the account blocked flag if the PIN attempts have been reset by an admin.
|
||||
func (h *MenuHandlers) CheckBlockedStatus(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||
var res resource.Result
|
||||
store := h.userdataStore
|
||||
|
||||
flag_account_blocked, _ := h.flagManager.GetFlag("flag_account_blocked")
|
||||
|
||||
sessionId, ok := ctx.Value("SessionId").(string)
|
||||
if !ok {
|
||||
return res, fmt.Errorf("missing session")
|
||||
}
|
||||
|
||||
currentWrongPinAttempts, err := store.ReadEntry(ctx, sessionId, storedb.DATA_INCORRECT_PIN_ATTEMPTS)
|
||||
if err != nil {
|
||||
if !db.IsNotFound(err) {
|
||||
return res, nil
|
||||
}
|
||||
}
|
||||
|
||||
pinAttemptsValue, _ := strconv.ParseUint(string(currentWrongPinAttempts), 0, 64)
|
||||
|
||||
if pinAttemptsValue == 0 {
|
||||
res.FlagReset = append(res.FlagReset, flag_account_blocked)
|
||||
return res, nil
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// ResetIncorrectPin resets the incorrect pin flag after a new PIN attempt.
|
||||
func (h *MenuHandlers) ResetIncorrectPin(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||
var res resource.Result
|
||||
@ -496,13 +467,7 @@ func (h *MenuHandlers) ResetOthersPin(ctx context.Context, sym string, input []b
|
||||
|
||||
err = store.WriteEntry(ctx, string(blockedPhonenumber), storedb.DATA_ACCOUNT_PIN, []byte(hashedTmporaryPin))
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
|
||||
err = store.WriteEntry(ctx, string(blockedPhonenumber), storedb.DATA_INCORRECT_PIN_ATTEMPTS, []byte(string("0")))
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to reset incorrect PIN attempts", "key", storedb.DATA_INCORRECT_PIN_ATTEMPTS, "error", err)
|
||||
return res, err
|
||||
return res, nil
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
@ -62,7 +62,6 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountService)
|
||||
}
|
||||
//appHandlers = appHandlers.WithPersister(ls.Pe)
|
||||
appHandlers.SetPersister(ls.Pe)
|
||||
ls.DbRs.AddLocalFunc("check_blocked_status", appHandlers.CheckBlockedStatus)
|
||||
ls.DbRs.AddLocalFunc("set_language", appHandlers.SetLanguage)
|
||||
ls.DbRs.AddLocalFunc("create_account", appHandlers.CreateAccount)
|
||||
ls.DbRs.AddLocalFunc("save_temporary_pin", appHandlers.SaveTemporaryPin)
|
||||
|
@ -4,8 +4,8 @@ TXTS = $(wildcard ./*.txt.orig)
|
||||
VISE_PATH := ../../go-vise
|
||||
|
||||
# Rule to build .bin files from .vis files
|
||||
%.vis: buildasm
|
||||
./vise-asm -f pp.csv $(basename $@).vis > $(basename $@).bin
|
||||
%.vis:
|
||||
go run $(VISE_PATH)/dev/asm/main.go -f pp.csv $(basename $@).vis > $(basename $@).bin
|
||||
@echo "Built $(basename $@).bin from $(basename $@).vis"
|
||||
|
||||
# Rule to copy .orig files to .txt
|
||||
@ -19,10 +19,5 @@ all: $(INPUTS) $(TXTS)
|
||||
|
||||
clean:
|
||||
rm -vf *.bin
|
||||
rm -vf ./vise-asm
|
||||
|
||||
buildasm:
|
||||
go build -v -o ./vise-asm $(VISE_PATH)/dev/asm/main.go
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
BIN
services/registration/_catch.bin
Normal file
BIN
services/registration/_catch.bin
Normal file
Binary file not shown.
BIN
services/registration/account_creation.bin
Normal file
BIN
services/registration/account_creation.bin
Normal file
Binary file not shown.
BIN
services/registration/account_creation_failed.bin
Normal file
BIN
services/registration/account_creation_failed.bin
Normal file
Binary file not shown.
BIN
services/registration/account_pending.bin
Normal file
BIN
services/registration/account_pending.bin
Normal file
Binary file not shown.
BIN
services/registration/address.bin
Normal file
BIN
services/registration/address.bin
Normal file
Binary file not shown.
BIN
services/registration/amount.bin
Normal file
BIN
services/registration/amount.bin
Normal file
Binary file not shown.
BIN
services/registration/api_failure.bin
Normal file
BIN
services/registration/api_failure.bin
Normal file
Binary file not shown.
BIN
services/registration/balances.bin
Normal file
BIN
services/registration/balances.bin
Normal file
Binary file not shown.
BIN
services/registration/blocked_account.bin
Normal file
BIN
services/registration/blocked_account.bin
Normal file
Binary file not shown.
BIN
services/registration/change_language.bin
Normal file
BIN
services/registration/change_language.bin
Normal file
Binary file not shown.
BIN
services/registration/check_statement.bin
Normal file
BIN
services/registration/check_statement.bin
Normal file
Binary file not shown.
BIN
services/registration/community_balance.bin
Normal file
BIN
services/registration/community_balance.bin
Normal file
Binary file not shown.
BIN
services/registration/confirm_create_pin.bin
Normal file
BIN
services/registration/confirm_create_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/confirm_others_new_pin.bin
Normal file
BIN
services/registration/confirm_others_new_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/confirm_pin_change.bin
Normal file
BIN
services/registration/confirm_pin_change.bin
Normal file
Binary file not shown.
BIN
services/registration/create_pin.bin
Normal file
BIN
services/registration/create_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/create_pin_mismatch.bin
Normal file
BIN
services/registration/create_pin_mismatch.bin
Normal file
Binary file not shown.
BIN
services/registration/display_profile_info.bin
Normal file
BIN
services/registration/display_profile_info.bin
Normal file
Binary file not shown.
BIN
services/registration/edit_family_name.bin
Normal file
BIN
services/registration/edit_family_name.bin
Normal file
Binary file not shown.
BIN
services/registration/edit_first_name.bin
Normal file
BIN
services/registration/edit_first_name.bin
Normal file
Binary file not shown.
BIN
services/registration/edit_location.bin
Normal file
BIN
services/registration/edit_location.bin
Normal file
Binary file not shown.
BIN
services/registration/edit_offerings.bin
Normal file
BIN
services/registration/edit_offerings.bin
Normal file
Binary file not shown.
BIN
services/registration/edit_profile.bin
Normal file
BIN
services/registration/edit_profile.bin
Normal file
Binary file not shown.
BIN
services/registration/edit_yob.bin
Normal file
BIN
services/registration/edit_yob.bin
Normal file
Binary file not shown.
BIN
services/registration/enter_other_number.bin
Normal file
BIN
services/registration/enter_other_number.bin
Normal file
Binary file not shown.
BIN
services/registration/enter_others_new_pin.bin
Normal file
BIN
services/registration/enter_others_new_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/enter_pin.bin
Normal file
BIN
services/registration/enter_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/help.bin
Normal file
BIN
services/registration/help.bin
Normal file
Binary file not shown.
BIN
services/registration/incorrect_date_format.bin
Normal file
BIN
services/registration/incorrect_date_format.bin
Normal file
Binary file not shown.
BIN
services/registration/incorrect_pin.bin
Normal file
BIN
services/registration/incorrect_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/invalid_amount.bin
Normal file
BIN
services/registration/invalid_amount.bin
Normal file
Binary file not shown.
BIN
services/registration/invalid_others_pin.bin
Normal file
BIN
services/registration/invalid_others_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/invalid_pin.bin
Normal file
BIN
services/registration/invalid_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/invalid_recipient.bin
Normal file
BIN
services/registration/invalid_recipient.bin
Normal file
Binary file not shown.
BIN
services/registration/invite_recipient.bin
Normal file
BIN
services/registration/invite_recipient.bin
Normal file
Binary file not shown.
BIN
services/registration/invite_result.bin
Normal file
BIN
services/registration/invite_result.bin
Normal file
Binary file not shown.
BIN
services/registration/language_changed.bin
Normal file
BIN
services/registration/language_changed.bin
Normal file
Binary file not shown.
0
services/registration/list_offering.bin
Normal file
0
services/registration/list_offering.bin
Normal file
BIN
services/registration/main.bin
Normal file
BIN
services/registration/main.bin
Normal file
Binary file not shown.
BIN
services/registration/my_account.bin
Normal file
BIN
services/registration/my_account.bin
Normal file
Binary file not shown.
BIN
services/registration/my_balance.bin
Normal file
BIN
services/registration/my_balance.bin
Normal file
Binary file not shown.
BIN
services/registration/my_vouchers.bin
Normal file
BIN
services/registration/my_vouchers.bin
Normal file
Binary file not shown.
BIN
services/registration/new_pin.bin
Normal file
BIN
services/registration/new_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/no_admin_privilege.bin
Normal file
BIN
services/registration/no_admin_privilege.bin
Normal file
Binary file not shown.
BIN
services/registration/no_transfers.bin
Normal file
BIN
services/registration/no_transfers.bin
Normal file
Binary file not shown.
BIN
services/registration/no_voucher.bin
Normal file
BIN
services/registration/no_voucher.bin
Normal file
Binary file not shown.
BIN
services/registration/old_pin.bin
Normal file
BIN
services/registration/old_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/others_pin_mismatch.bin
Normal file
BIN
services/registration/others_pin_mismatch.bin
Normal file
Binary file not shown.
BIN
services/registration/pin_entry.bin
Normal file
BIN
services/registration/pin_entry.bin
Normal file
Binary file not shown.
BIN
services/registration/pin_management.bin
Normal file
BIN
services/registration/pin_management.bin
Normal file
Binary file not shown.
BIN
services/registration/pin_reset_mismatch.bin
Normal file
BIN
services/registration/pin_reset_mismatch.bin
Normal file
Binary file not shown.
BIN
services/registration/pin_reset_result.bin
Normal file
BIN
services/registration/pin_reset_result.bin
Normal file
Binary file not shown.
BIN
services/registration/pin_reset_success.bin
Normal file
BIN
services/registration/pin_reset_success.bin
Normal file
Binary file not shown.
BIN
services/registration/profile_update_success.bin
Normal file
BIN
services/registration/profile_update_success.bin
Normal file
Binary file not shown.
BIN
services/registration/quit.bin
Normal file
BIN
services/registration/quit.bin
Normal file
Binary file not shown.
BIN
services/registration/root.bin
Normal file
BIN
services/registration/root.bin
Normal file
Binary file not shown.
@ -1,11 +1,9 @@
|
||||
LOAD check_blocked_status 1
|
||||
RELOAD check_blocked_status
|
||||
CATCH blocked_account flag_account_blocked 1
|
||||
CATCH select_language flag_language_set 0
|
||||
CATCH terms flag_account_created 0
|
||||
LOAD check_account_status 0
|
||||
RELOAD check_account_status
|
||||
CATCH api_failure flag_api_call_error 1
|
||||
CATCH api_failure flag_api_call_error 1
|
||||
CATCH account_pending flag_account_pending 1
|
||||
CATCH create_pin flag_pin_set 0
|
||||
CATCH main flag_account_success 1
|
||||
|
BIN
services/registration/select_gender.bin
Normal file
BIN
services/registration/select_gender.bin
Normal file
Binary file not shown.
BIN
services/registration/select_language.bin
Normal file
BIN
services/registration/select_language.bin
Normal file
Binary file not shown.
BIN
services/registration/select_voucher.bin
Normal file
BIN
services/registration/select_voucher.bin
Normal file
Binary file not shown.
BIN
services/registration/send.bin
Normal file
BIN
services/registration/send.bin
Normal file
Binary file not shown.
BIN
services/registration/set_default.bin
Normal file
BIN
services/registration/set_default.bin
Normal file
Binary file not shown.
BIN
services/registration/set_eng.bin
Normal file
BIN
services/registration/set_eng.bin
Normal file
Binary file not shown.
BIN
services/registration/set_female.bin
Normal file
BIN
services/registration/set_female.bin
Normal file
Binary file not shown.
BIN
services/registration/set_male.bin
Normal file
BIN
services/registration/set_male.bin
Normal file
Binary file not shown.
BIN
services/registration/set_swa.bin
Normal file
BIN
services/registration/set_swa.bin
Normal file
Binary file not shown.
BIN
services/registration/set_unspecified.bin
Normal file
BIN
services/registration/set_unspecified.bin
Normal file
Binary file not shown.
BIN
services/registration/terms.bin
Normal file
BIN
services/registration/terms.bin
Normal file
Binary file not shown.
BIN
services/registration/transaction_initiated.bin
Normal file
BIN
services/registration/transaction_initiated.bin
Normal file
Binary file not shown.
BIN
services/registration/transaction_pin.bin
Normal file
BIN
services/registration/transaction_pin.bin
Normal file
Binary file not shown.
BIN
services/registration/transactions.bin
Normal file
BIN
services/registration/transactions.bin
Normal file
Binary file not shown.
BIN
services/registration/unregistered_number.bin
Normal file
BIN
services/registration/unregistered_number.bin
Normal file
Binary file not shown.
BIN
services/registration/update_familyname.bin
Normal file
BIN
services/registration/update_familyname.bin
Normal file
Binary file not shown.
BIN
services/registration/update_firstname.bin
Normal file
BIN
services/registration/update_firstname.bin
Normal file
Binary file not shown.
BIN
services/registration/update_gender.bin
Normal file
BIN
services/registration/update_gender.bin
Normal file
Binary file not shown.
BIN
services/registration/update_location.bin
Normal file
BIN
services/registration/update_location.bin
Normal file
Binary file not shown.
BIN
services/registration/update_offerings.bin
Normal file
BIN
services/registration/update_offerings.bin
Normal file
Binary file not shown.
BIN
services/registration/update_profile_items.bin
Normal file
BIN
services/registration/update_profile_items.bin
Normal file
Binary file not shown.
BIN
services/registration/update_success.bin
Normal file
BIN
services/registration/update_success.bin
Normal file
Binary file not shown.
BIN
services/registration/update_yob.bin
Normal file
BIN
services/registration/update_yob.bin
Normal file
Binary file not shown.
BIN
services/registration/view_profile.bin
Normal file
BIN
services/registration/view_profile.bin
Normal file
Binary file not shown.
BIN
services/registration/view_statement.bin
Normal file
BIN
services/registration/view_statement.bin
Normal file
Binary file not shown.
BIN
services/registration/view_voucher.bin
Normal file
BIN
services/registration/view_voucher.bin
Normal file
Binary file not shown.
BIN
services/registration/voucher_details.bin
Normal file
BIN
services/registration/voucher_details.bin
Normal file
Binary file not shown.
BIN
services/registration/voucher_set.bin
Normal file
BIN
services/registration/voucher_set.bin
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user