Don't accept empty user in "Add stock and adjust credit" menu #46

Open
opened 2026-05-31 15:32:29 +02:00 by oysteikt · 0 comments
Owner

Initially found by @berntjd


The add stock menu currently lets you add products without crediting the money to a user.

[Dibbler main menu]
 1 ) Buy
 2 ) Product list
 3 ) Show user
 4 ) User list
 5 ) Adjust credit
 6 ) Transfer credit between users
 7 ) Add stock and adjust credit
 8 ) Add/edit
 9 ) Product search
10 ) Statistics
11 ) Frequently Asked Questions
12 ) Print a label
> 7

---------------------------------------------------

Products                                     Amount
---------------------------------------------------
Enter user id or a string of the form "<number> <product>"
> 4 Kake
Interpreting input as "<number> <product>"
4 of Kake registered
What did you pay a piece?(1-100000)> [59]>

---------------------------------------------------
Amount to be credited:                          236

Products                                     Amount
---------------------------------------------------
Kake                                              4
---------------------------------------------------
Enter user id or more strings of the form "<number> <product>"
>
Did you pay a different price?
> [y/N]:
Log message> test
New stock for Kake: 4
Success! Transaction performed:

[Dibbler main menu]
 1 ) Buy
 2 ) Product list
 3 ) Show user
 4 ) User list
 5 ) Adjust credit
 6 ) Transfer credit between users
 7 ) Add stock and adjust credit
 8 ) Add/edit
 9 ) Product search
10 ) Statistics
11 ) Frequently Asked Questions
12 ) Print a label
>
Initially found by @berntjd --- The add stock menu currently lets you add products without crediting the money to a user. ``` [Dibbler main menu] 1 ) Buy 2 ) Product list 3 ) Show user 4 ) User list 5 ) Adjust credit 6 ) Transfer credit between users 7 ) Add stock and adjust credit 8 ) Add/edit 9 ) Product search 10 ) Statistics 11 ) Frequently Asked Questions 12 ) Print a label > 7 --------------------------------------------------- Products Amount --------------------------------------------------- Enter user id or a string of the form "<number> <product>" > 4 Kake Interpreting input as "<number> <product>" 4 of Kake registered What did you pay a piece?(1-100000)> [59]> --------------------------------------------------- Amount to be credited: 236 Products Amount --------------------------------------------------- Kake 4 --------------------------------------------------- Enter user id or more strings of the form "<number> <product>" > Did you pay a different price? > [y/N]: Log message> test New stock for Kake: 4 Success! Transaction performed: [Dibbler main menu] 1 ) Buy 2 ) Product list 3 ) Show user 4 ) User list 5 ) Adjust credit 6 ) Transfer credit between users 7 ) Add stock and adjust credit 8 ) Add/edit 9 ) Product search 10 ) Statistics 11 ) Frequently Asked Questions 12 ) Print a label > ```
oysteikt added the bug label 2026-05-31 15:32:29 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Projects/dibbler#46