Commit Graph

13 Commits

Author SHA1 Message Date
Torsten Schulz (local)
ad0033031d Validate money change input in update_money function: Added checks to ensure the money_change value is finite before executing the database update, preventing potential serialization errors with invalid values. 2025-12-08 15:53:31 +01:00
Torsten Schulz (local)
d078b6b19a Refactor WebSocket user ID filtering and enhance SQL query security: Updated user ID handling in the WebSocket server to improve filtering logic for numeric user IDs. Implemented parameterized queries in the database operations across multiple worker files to prevent SQL injection vulnerabilities, ensuring safer data handling. 2025-12-08 11:56:04 +01:00
Torsten Schulz (local)
a0e14788c7 Refactor money update execution in BaseWorker: Simplified the SQL execution by directly constructing the update query without parameterized placeholders, addressing serialization issues. Updated comments for clarity on the handling of money values and ensured compatibility with trusted data sources. Additionally, modified the casting of money in the director query to text for consistent mapping in Rust. 2025-12-01 11:31:37 +01:00
Torsten Schulz (local)
260b3b2962 Refactor SQL parameter handling in BaseWorker: Updated the execution of the money update query to pass parameters in their natural types, allowing PostgreSQL to handle type casting automatically. Improved comments for clarity on the changes made to ensure compatibility with the existing database schema. 2025-12-01 11:18:54 +01:00
Torsten Schulz (local)
25b69e48fe Refactor money update execution in BaseWorker: Updated parameter handling in SQL execution to pass all values as strings, allowing for proper type casting in the database. Enhanced comments for clarity on the changes made to ensure compatibility with existing database schema. 2025-12-01 11:15:46 +01:00
Torsten Schulz (local)
2c91f1868b Refactor SQL execution in BaseWorker: Updated the money update logic to register and execute prepared statements by name, enhancing clarity and consistency with existing code. Improved comments for better understanding of numeric type handling in SQL queries. 2025-12-01 11:09:17 +01:00
Torsten Schulz (local)
0825c05c31 Refactor money update logic in BaseWorker: Simplified the SQL execution by removing named prepared statement caches to avoid signature conflicts during schema changes. Updated comments for clarity on the handling of money change as a numeric type, ensuring compatibility with the database. 2025-12-01 10:59:02 +01:00
Torsten Schulz (local)
6f9e13b290 Update money handling in BaseWorker: Changed SQL query to cast money change to numeric type for compatibility with existing database schema. Updated parameter passing to ensure the value is sent as a string, allowing proper casting in the database. Added comments for clarity on the changes made. 2025-12-01 10:39:32 +01:00
Torsten Schulz (local)
8ee0bbf3cd Add TransportWorker and enhance logging: Introduced TransportWorker to the worker module and improved shutdown logging in the daemon for better visibility during system termination. Updated watchdog thread sleep mechanism for quicker shutdown response and refined error handling in DbError conversion to include SQLSTATE as a string. 2025-11-26 16:03:27 +01:00
Torsten Schulz (local)
5f44f50304 Refine SQL query type casting in BaseWorker: Updated the update_money query to explicitly cast parameters to their respective types (int4, float8, text) for improved type safety and database interaction. 2025-11-24 09:41:59 +01:00
Torsten Schulz (local)
2c547ed495 Enhance logging in BaseWorker: Updated watchdog logging to suppress "idle" messages, reducing spam during continuous operation and improving debug clarity. 2025-11-24 09:29:54 +01:00
Torsten Schulz (local)
f9d869ee23 Refactor worker modules: Added watchdog stop in BaseWorker, improved debug logging in PoliticsWorker, and removed unused credit_id in UserCharacterWorker. 2025-11-21 23:25:59 +01:00
Torsten Schulz (local)
d0ec363f09 Initial commit: Rust YpDaemon 2025-11-21 23:05:34 +01:00