mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 11:18:08 +00:00
CRITICAL SECURITY FIX: Prevent client bypass with method='unlocked'
Fixed critical vulnerability where ANY locked door/container could be bypassed
by sending method='unlocked' to the server.
The Vulnerability:
- Server used OR logic: if method == 'unlocked' || !room['locked']
- This meant: "If client says unlocked OR room is unlocked, grant access"
- Attacker could bypass ANY lock by sending method='unlocked'
- Example exploit: {targetType: "door", targetId: "ceo", method: "unlocked"}
The Fix:
- Changed to AND logic: if method == 'unlocked' && !room['locked']
- Now means: "Only if client says unlocked AND room is ACTUALLY unlocked"
- Added explicit rejection: return false if method='unlocked' on locked item
- Server now logs SECURITY VIOLATION when bypass is attempted
Changes:
- game.rb:151: Changed || to && for doors
- game.rb:157-160: Added explicit rejection for locked doors
- game.rb:185: Changed || to && for objects
- game.rb:191-194: Added explicit rejection for locked objects
Tests Added (4 new security tests):
1. Verify locked door CANNOT be bypassed with method='unlocked' (422 error)
2. Verify locked container CANNOT be bypassed with method='unlocked' (422 error)
3. Verify unlocked door CAN use method='unlocked' (200 success)
4. Verify unlocked container CAN use method='unlocked' (200 success)
Test Results: 28 tests, 95 assertions, 0 failures
Security Principle: Client state is NEVER trusted for authorization.
Server validates against its own scenario_data, not client claims.
This commit is contained in:
@@ -146,12 +146,19 @@ module BreakEscape
|
||||
room = room_data(target_id)
|
||||
return false unless room
|
||||
|
||||
# Handle unlocked doors - allow access without lock validation
|
||||
if method == 'unlocked' || !room['locked']
|
||||
Rails.logger.info "[BreakEscape] Door is unlocked, granting access"
|
||||
# SECURITY: Only allow 'unlocked' method if door is ACTUALLY unlocked in server data
|
||||
# Client cannot be trusted - must validate against server state
|
||||
if method == 'unlocked' && !room['locked']
|
||||
Rails.logger.info "[BreakEscape] Door is unlocked in server data, granting access"
|
||||
return true
|
||||
end
|
||||
|
||||
# SECURITY: Reject 'unlocked' method for locked doors (client bypass attempt)
|
||||
if method == 'unlocked' && room['locked']
|
||||
Rails.logger.warn "[BreakEscape] SECURITY VIOLATION: Client sent method='unlocked' for LOCKED door #{target_id}"
|
||||
return false
|
||||
end
|
||||
|
||||
case method
|
||||
when 'key', 'lockpick', 'biometric', 'bluetooth', 'rfid'
|
||||
# Client validated the unlock - trust it
|
||||
@@ -173,12 +180,19 @@ module BreakEscape
|
||||
if object
|
||||
Rails.logger.info "[BreakEscape] Found object: id=#{object['id']}, name=#{object['name']}, locked=#{object['locked']}, requires=#{object['requires']}"
|
||||
|
||||
# Handle unlocked objects - allow access without lock validation
|
||||
if method == 'unlocked' || !object['locked']
|
||||
Rails.logger.info "[BreakEscape] Object is unlocked, granting access"
|
||||
# SECURITY: Only allow 'unlocked' method if object is ACTUALLY unlocked in server data
|
||||
# Client cannot be trusted - must validate against server state
|
||||
if method == 'unlocked' && !object['locked']
|
||||
Rails.logger.info "[BreakEscape] Object is unlocked in server data, granting access"
|
||||
return true
|
||||
end
|
||||
|
||||
# SECURITY: Reject 'unlocked' method for locked objects (client bypass attempt)
|
||||
if method == 'unlocked' && object['locked']
|
||||
Rails.logger.warn "[BreakEscape] SECURITY VIOLATION: Client sent method='unlocked' for LOCKED object #{target_id}"
|
||||
return false
|
||||
end
|
||||
|
||||
case method
|
||||
when 'key', 'lockpick', 'biometric', 'bluetooth', 'rfid'
|
||||
# Client validated the unlock - trust it
|
||||
|
||||
@@ -20288,3 +20288,775 @@ Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Completed 200 OK in 5ms (Views: 0.1ms | ActiveRecord: 1.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1[0m [[nil, "schema_sha1"]]
|
||||
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
[1m[35m (0.4ms)[0m [1m[35mPRAGMA foreign_keys[0m
|
||||
[1m[35m (0.0ms)[0m [1m[35mPRAGMA defer_foreign_keys[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA defer_foreign_keys = ON[0m
|
||||
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys = OFF[0m
|
||||
[1m[36mFixtures Load (0.2ms)[0m [1m[31mDELETE FROM "break_escape_demo_users";
|
||||
DELETE FROM "break_escape_missions";
|
||||
INSERT INTO "break_escape_demo_users" ("id", "handle", "created_at", "updated_at") VALUES (149617800, 'test_user', '2025-11-21 21:05:20', '2025-11-21 21:05:20');
|
||||
INSERT INTO "break_escape_demo_users" ("id", "handle", "created_at", "updated_at") VALUES (618102942, 'other_user', '2025-11-21 21:05:20', '2025-11-21 21:05:20');
|
||||
INSERT INTO "break_escape_missions" ("id", "name", "display_name", "description", "published", "difficulty_level", "created_at", "updated_at") VALUES (418560898, 'ceo_exfil', 'CEO Exfiltration', 'Test scenario', 1, 3, '2025-11-21 21:05:20', '2025-11-21 21:05:20');
|
||||
INSERT INTO "break_escape_missions" ("id", "name", "display_name", "description", "published", "difficulty_level", "created_at", "updated_at") VALUES (636030761, 'test_unpublished', 'Unpublished Test', 'Not visible', 0, 1, '2025-11-21 21:05:20', '2025-11-21 21:05:20')[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA defer_foreign_keys = 0[0m
|
||||
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys = 1[0m
|
||||
[1m[36mTRANSACTION (4.6ms)[0m [1m[36mcommit transaction[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA foreign_key_check[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
---------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_locked_door_cannot_be_bypassed_with_method='unlocked'
|
||||
---------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.7ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:20.856877"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:20.856088"], ["updated_at", "2025-11-21 21:05:20.856088"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:20 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.2ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=, method=unlocked
|
||||
[BreakEscape] SECURITY VIOLATION: Client sent method='unlocked' for LOCKED door office_pin
|
||||
Completed 422 Unprocessable Content in 32ms (Views: 0.3ms | ActiveRecord: 0.4ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_method='unlocked'_only_works_for_actually_unlocked_containers
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:20.988692"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:20.988503"], ["updated_at", "2025-11-21 21:05:20.988503"]]
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:20 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"chest_unlocked", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=chest_unlocked, attempt=, method=unlocked
|
||||
[BreakEscape] Found object: id=chest_unlocked, name=Open Chest, locked=false, requires=
|
||||
[BreakEscape] Object is unlocked in server data, granting access
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"chest_unlocked\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:20.994499"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_method='unlocked'_only_works_for_actually_unlocked_doors
|
||||
------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.5ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:20.999929"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:20.999696"], ["updated_at", "2025-11-21 21:05:20.999696"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:21 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_unlocked", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_unlocked, attempt=, method=unlocked
|
||||
[BreakEscape] Door is unlocked in server data, granting access
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_unlocked\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:21.005009"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_locked_container_cannot_be_bypassed_with_method='unlocked'
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:21.008634"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:21.008454"], ["updated_at", "2025-11-21 21:05:21.008454"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:21 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"safe_pin", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=safe_pin, attempt=, method=unlocked
|
||||
[BreakEscape] Found object: id=safe_pin, name=PIN Safe, locked=true, requires=1234
|
||||
[BreakEscape] SECURITY VIOLATION: Client sent method='unlocked' for LOCKED object safe_pin
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1[0m [[nil, "schema_sha1"]]
|
||||
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
[1m[35m (0.5ms)[0m [1m[35mPRAGMA foreign_keys[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA defer_foreign_keys[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA defer_foreign_keys = ON[0m
|
||||
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys = OFF[0m
|
||||
[1m[36mFixtures Load (0.3ms)[0m [1m[31mDELETE FROM "break_escape_demo_users";
|
||||
DELETE FROM "break_escape_missions";
|
||||
INSERT INTO "break_escape_demo_users" ("id", "handle", "created_at", "updated_at") VALUES (149617800, 'test_user', '2025-11-21 21:05:48', '2025-11-21 21:05:48');
|
||||
INSERT INTO "break_escape_demo_users" ("id", "handle", "created_at", "updated_at") VALUES (618102942, 'other_user', '2025-11-21 21:05:48', '2025-11-21 21:05:48');
|
||||
INSERT INTO "break_escape_missions" ("id", "name", "display_name", "description", "published", "difficulty_level", "created_at", "updated_at") VALUES (418560898, 'ceo_exfil', 'CEO Exfiltration', 'Test scenario', 1, 3, '2025-11-21 21:05:48', '2025-11-21 21:05:48');
|
||||
INSERT INTO "break_escape_missions" ("id", "name", "display_name", "description", "published", "difficulty_level", "created_at", "updated_at") VALUES (636030761, 'test_unpublished', 'Unpublished Test', 'Not visible', 0, 1, '2025-11-21 21:05:48', '2025-11-21 21:05:48')[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA defer_foreign_keys = 0[0m
|
||||
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys = 1[0m
|
||||
[1m[36mTRANSACTION (4.1ms)[0m [1m[36mcommit transaction[0m
|
||||
[1m[35m (0.1ms)[0m [1m[35mPRAGMA foreign_key_check[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_unlock_response_should_not_expose_'requires'_field_for_exploitable_locks
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.2ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.7ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.350704"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.349916"], ["updated_at", "2025-11-21 21:05:48.349916"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"9876", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.2ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.2ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.3ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=9876, method=pin
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_pin\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.463864"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 37ms (Views: 0.3ms | ActiveRecord: 1.1ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_RFID_lock:_should_trust_client_validation
|
||||
--------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.490118"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.489896"], ["updated_at", "2025-11-21 21:05:48.489896"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"door_rfid", "attempt"=>nil, "method"=>"rfid", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.2ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=door_rfid, attempt=, method=rfid
|
||||
[BreakEscape] Found object: id=door_rfid, name=RFID Door, locked=true, requires=admin_badge
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"door_rfid\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.496762"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_locked_container_cannot_be_bypassed_with_method='unlocked'
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.501227"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.501054"], ["updated_at", "2025-11-21 21:05:48.501054"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"safe_pin", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=safe_pin, attempt=, method=unlocked
|
||||
[BreakEscape] Found object: id=safe_pin, name=PIN Safe, locked=true, requires=1234
|
||||
[BreakEscape] SECURITY VIOLATION: Client sent method='unlocked' for LOCKED object safe_pin
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.2ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
||||
------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_multiple_unlock_attempts_should_update_state_correctly
|
||||
------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.509840"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.509648"], ["updated_at", "2025-11-21 21:05:48.509648"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"9876", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=9876, method=pin
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_pin\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.515203"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_password", "attempt"=>"opensesame", "method"=>"password", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_password, attempt=opensesame, method=password
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_pin\",\"office_password\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.520595"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"safe_pin", "attempt"=>"1234", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=safe_pin, attempt=1234, method=pin
|
||||
[BreakEscape] Found object: id=safe_pin, name=PIN Safe, locked=true, requires=1234
|
||||
[BreakEscape] Password validation: required='1234', attempt='1234', result=true
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_pin\",\"office_password\"],\"unlockedObjects\":[\"safe_pin\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.525639"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_password_lock:_correct_password_should_unlock
|
||||
------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.5ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.530599"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.530348"], ["updated_at", "2025-11-21 21:05:48.530348"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"cabinet_password", "attempt"=>"secret123", "method"=>"password", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=cabinet_password, attempt=secret123, method=password
|
||||
[BreakEscape] Found object: id=cabinet_password, name=Password Cabinet, locked=true, requires=secret123
|
||||
[BreakEscape] Password validation: required='secret123', attempt='secret123', result=true
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"cabinet_password\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.536291"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
----------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_unlocked_container:_should_grant_access_without_validation
|
||||
----------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.540848"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.540664"], ["updated_at", "2025-11-21 21:05:48.540664"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"chest_unlocked", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=chest_unlocked, attempt=, method=unlocked
|
||||
[BreakEscape] Found object: id=chest_unlocked, name=Open Chest, locked=false, requires=
|
||||
[BreakEscape] Object is unlocked in server data, granting access
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"chest_unlocked\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.558901"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.8ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.8ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_lockpick:_should_trust_client_validation
|
||||
-------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.564517"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.564326"], ["updated_at", "2025-11-21 21:05:48.564326"]]
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"box_lockpick", "attempt"=>nil, "method"=>"lockpick", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=box_lockpick, attempt=, method=lockpick
|
||||
[BreakEscape] Found object: id=box_lockpick, name=Lockpickable Box, locked=true, requires=
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"box_lockpick\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.569661"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_unlock_with_invalid_method_should_fail
|
||||
--------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.6ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.573161"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.572995"], ["updated_at", "2025-11-21 21:05:48.572995"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"9876", "method"=>"invalid_method", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=9876, method=invalid_method
|
||||
Completed 422 Unprocessable Content in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-----------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_with_password_lock:_case_sensitivity
|
||||
-----------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.6ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.580496"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.580198"], ["updated_at", "2025-11-21 21:05:48.580198"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_password", "attempt"=>"OpenSesame", "method"=>"password", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.2ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_password, attempt=OpenSesame, method=password
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.3ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_biometric_lock:_should_trust_client_validation
|
||||
-------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.588766"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.588600"], ["updated_at", "2025-11-21 21:05:48.588600"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"scanner_biometric", "attempt"=>nil, "method"=>"biometric", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=scanner_biometric, attempt=, method=biometric
|
||||
[BreakEscape] Found object: id=scanner_biometric, name=Biometric Scanner, locked=true, requires=ceo_fingerprint
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.5ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"scanner_biometric\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.594411"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.9ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_unlock_response_should_filter_requires_from_contents
|
||||
--------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.598567"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.598378"], ["updated_at", "2025-11-21 21:05:48.598378"]]
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"safe_pin", "attempt"=>"1234", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=safe_pin, attempt=1234, method=pin
|
||||
[BreakEscape] Found object: id=safe_pin, name=PIN Safe, locked=true, requires=1234
|
||||
[BreakEscape] Password validation: required='1234', attempt='1234', result=true
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"safe_pin\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.603610"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
||||
---------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_with_PIN_lock:_incorrect_PIN_should_fail
|
||||
---------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.606821"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.606659"], ["updated_at", "2025-11-21 21:05:48.606659"]]
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"0000", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=0000, method=pin
|
||||
Completed 422 Unprocessable Content in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_method='unlocked'_only_works_for_actually_unlocked_containers
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.613218"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.613039"], ["updated_at", "2025-11-21 21:05:48.613039"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"chest_unlocked", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=chest_unlocked, attempt=, method=unlocked
|
||||
[BreakEscape] Found object: id=chest_unlocked, name=Open Chest, locked=false, requires=
|
||||
[BreakEscape] Object is unlocked in server data, granting access
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"chest_unlocked\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.617497"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_key_lock:_should_trust_client_validation
|
||||
-------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.632162"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.621746"], ["updated_at", "2025-11-21 21:05:48.621746"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"drawer_key", "attempt"=>nil, "method"=>"key", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=drawer_key, attempt=, method=key
|
||||
[BreakEscape] Found object: id=drawer_key, name=Locked Drawer, locked=true, requires=drawer_key
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.6ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"drawer_key\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.637665"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 5ms (Views: 0.1ms | ActiveRecord: 0.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_password_lock:_empty_attempt_should_fail
|
||||
-------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.641870"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.641712"], ["updated_at", "2025-11-21 21:05:48.641712"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"cabinet_password", "attempt"=>"", "method"=>"password", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=cabinet_password, attempt=, method=password
|
||||
[BreakEscape] Found object: id=cabinet_password, name=Password Cabinet, locked=true, requires=secret123
|
||||
[BreakEscape] Password validation: required='secret123', attempt='', result=false
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_unlock_non-existent_object_should_fail
|
||||
--------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.648004"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.647818"], ["updated_at", "2025-11-21 21:05:48.647818"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"non_existent_object", "attempt"=>"1234", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=non_existent_object, attempt=1234, method=pin
|
||||
[BreakEscape] Object not found: non_existent_object
|
||||
Completed 422 Unprocessable Content in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_with_password_lock:_incorrect_password_should_fail
|
||||
-------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.654350"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.654181"], ["updated_at", "2025-11-21 21:05:48.654181"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_password", "attempt"=>"wrongpassword", "method"=>"password", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_password, attempt=wrongpassword, method=password
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_PIN_lock:_incorrect_PIN_should_fail
|
||||
--------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.660574"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.660391"], ["updated_at", "2025-11-21 21:05:48.660391"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"safe_pin", "attempt"=>"0000", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=safe_pin, attempt=0000, method=pin
|
||||
[BreakEscape] Found object: id=safe_pin, name=PIN Safe, locked=true, requires=1234
|
||||
[BreakEscape] Password validation: required='1234', attempt='0000', result=false
|
||||
Completed 422 Unprocessable Content in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_method='unlocked'_only_works_for_actually_unlocked_doors
|
||||
------------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.7ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.668120"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.667949"], ["updated_at", "2025-11-21 21:05:48.667949"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_unlocked", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.2ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.2ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_unlocked, attempt=, method=unlocked
|
||||
[BreakEscape] Door is unlocked in server data, granting access
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.2ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_unlocked\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.676833"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 0.9ms (5 queries, 0 cached) | GC: 10.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_with_password_lock:_correct_password_should_unlock
|
||||
-------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.5ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.682840"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.682544"], ["updated_at", "2025-11-21 21:05:48.682544"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_password", "attempt"=>"opensesame", "method"=>"password", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_password, attempt=opensesame, method=password
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_password\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.689708"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 5ms (Views: 0.1ms | ActiveRecord: 0.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_PIN_lock:_correct_PIN_should_unlock
|
||||
--------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.694416"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.694246"], ["updated_at", "2025-11-21 21:05:48.694246"]]
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"safe_pin", "attempt"=>"1234", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=safe_pin, attempt=1234, method=pin
|
||||
[BreakEscape] Found object: id=safe_pin, name=PIN Safe, locked=true, requires=1234
|
||||
[BreakEscape] Password validation: required='1234', attempt='1234', result=true
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"safe_pin\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.699508"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
||||
---------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_SECURITY:_locked_door_cannot_be_bypassed_with_method='unlocked'
|
||||
---------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.5ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.704621"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.704270"], ["updated_at", "2025-11-21 21:05:48.704270"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=, method=unlocked
|
||||
[BreakEscape] SECURITY VIOLATION: Client sent method='unlocked' for LOCKED door office_pin
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.3ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_unlock_same_door_twice_should_be_idempotent
|
||||
-------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.2ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (1.0ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.722794"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.722565"], ["updated_at", "2025-11-21 21:05:48.722565"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"9876", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=9876, method=pin
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.4ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_pin\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.729467"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.9ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"9876", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=9876, method=pin
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.5ms (4 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
--------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_with_key_lock:_should_trust_client_validation
|
||||
--------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.741760"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.741421"], ["updated_at", "2025-11-21 21:05:48.741421"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_key", "attempt"=>nil, "method"=>"key", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_key, attempt=, method=key
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.4ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.2ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_key\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.748864"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.9ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
---------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_door_with_PIN_lock:_correct_PIN_should_unlock
|
||||
---------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.754967"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.754680"], ["updated_at", "2025-11-21 21:05:48.754680"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_pin", "attempt"=>"9876", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_pin, attempt=9876, method=pin
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_pin\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.761599"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 5ms (Views: 0.1ms | ActiveRecord: 0.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_unlock_non-existent_door_should_fail
|
||||
------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.5ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.767146"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.766856"], ["updated_at", "2025-11-21 21:05:48.766856"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"non_existent_room", "attempt"=>"1234", "method"=>"pin", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=non_existent_room, attempt=1234, method=pin
|
||||
Completed 422 Unprocessable Content in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms (3 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-----------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_unlocked_door:_should_grant_access_without_validation
|
||||
-----------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.4ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.774813"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.774633"], ["updated_at", "2025-11-21 21:05:48.774633"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"door", "targetId"=>"office_unlocked", "attempt"=>nil, "method"=>"unlocked", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=door, id=office_unlocked, attempt=, method=unlocked
|
||||
[BreakEscape] Door is unlocked in server data, granting access
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.3ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\",\"office_unlocked\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.779554"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.7ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
||||
-------------------------------------------------------------------------------------------------
|
||||
BreakEscape::UnlockSystemTest: test_container_with_bluetooth_lock:_should_trust_client_validation
|
||||
-------------------------------------------------------------------------------------------------
|
||||
[1m[36mBreakEscape::Mission Load (0.1ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Game Create (0.3ms)[0m [1m[32mINSERT INTO "break_escape_games" ("player_type", "player_id", "mission_id", "scenario_data", "player_state", "status", "started_at", "completed_at", "score", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"[0m [["player_type", "BreakEscape::DemoUser"], ["player_id", 149617800], ["mission_id", 418560898], ["scenario_data", "{\"startRoom\":\"lobby\",\"rooms\":{\"lobby\":{\"type\":\"office_lobby\",\"locked\":false,\"connections\":{\"north\":\"office_pin\",\"south\":\"office_password\",\"east\":\"office_key\",\"west\":\"office_unlocked\"},\"objects\":[{\"id\":\"safe_pin\",\"name\":\"PIN Safe\",\"type\":\"safe\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"1234\",\"contents\":[{\"type\":\"document\",\"name\":\"Secret Document\"}]},{\"id\":\"cabinet_password\",\"name\":\"Password Cabinet\",\"type\":\"cabinet\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"secret123\",\"contents\":[{\"type\":\"key\",\"name\":\"Master Key\"}]},{\"id\":\"drawer_key\",\"name\":\"Locked Drawer\",\"type\":\"drawer\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"drawer_key\",\"contents\":[{\"type\":\"note\",\"name\":\"Important Note\"}]},{\"id\":\"box_lockpick\",\"name\":\"Lockpickable Box\",\"type\":\"box\",\"locked\":true,\"lockType\":\"lockpick\",\"difficulty\":3,\"contents\":[{\"type\":\"coin\",\"name\":\"Gold Coin\"}]},{\"id\":\"scanner_biometric\",\"name\":\"Biometric Scanner\",\"type\":\"scanner\",\"locked\":true,\"lockType\":\"biometric\",\"requires\":\"ceo_fingerprint\",\"contents\":[{\"type\":\"usb\",\"name\":\"Data USB\"}]},{\"id\":\"terminal_bluetooth\",\"name\":\"Bluetooth Terminal\",\"type\":\"terminal\",\"locked\":true,\"lockType\":\"bluetooth\",\"requires\":\"admin_device\",\"contents\":[{\"type\":\"file\",\"name\":\"Access Codes\"}]},{\"id\":\"door_rfid\",\"name\":\"RFID Door\",\"type\":\"door\",\"locked\":true,\"lockType\":\"rfid\",\"requires\":\"admin_badge\",\"contents\":[{\"type\":\"keycard\",\"name\":\"Security Card\"}]},{\"id\":\"chest_unlocked\",\"name\":\"Open Chest\",\"type\":\"chest\",\"locked\":false,\"contents\":[{\"type\":\"tool\",\"name\":\"Wrench\"}]}]},\"office_pin\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"pin\",\"requires\":\"9876\",\"connections\":{\"south\":\"lobby\"},\"objects\":[]},\"office_password\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"password\",\"requires\":\"opensesame\",\"connections\":{\"north\":\"lobby\"},\"objects\":[]},\"office_key\":{\"type\":\"office\",\"locked\":true,\"lockType\":\"key\",\"requires\":\"office_key\",\"connections\":{\"west\":\"lobby\"},\"objects\":[]},\"office_unlocked\":{\"type\":\"office\",\"locked\":false,\"connections\":{\"east\":\"lobby\"},\"objects\":[]}}}"], ["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["status", "in_progress"], ["started_at", "2025-11-21 21:05:48.783706"], ["completed_at", nil], ["score", 0], ["created_at", "2025-11-21 21:05:48.783509"], ["updated_at", "2025-11-21 21:05:48.783509"]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Started POST "/break_escape/games/1/unlock" for 127.0.0.1 at 2025-11-21 21:05:48 +0000
|
||||
Processing by BreakEscape::GamesController#unlock as HTML
|
||||
Parameters: {"targetType"=>"object", "targetId"=>"terminal_bluetooth", "attempt"=>nil, "method"=>"bluetooth", "id"=>"1"}
|
||||
[1m[36mBreakEscape::Game Load (0.1ms)[0m [1m[34mSELECT "break_escape_games".* FROM "break_escape_games" WHERE "break_escape_games"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" ORDER BY "break_escape_demo_users"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::DemoUser Load (0.1ms)[0m [1m[34mSELECT "break_escape_demo_users".* FROM "break_escape_demo_users" WHERE "break_escape_demo_users"."id" = ? LIMIT ?[0m [["id", 149617800], ["LIMIT", 1]]
|
||||
[BreakEscape] validate_unlock: type=object, id=terminal_bluetooth, attempt=, method=bluetooth
|
||||
[BreakEscape] Found object: id=terminal_bluetooth, name=Bluetooth Terminal, locked=true, requires=admin_device
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
||||
[1m[36mBreakEscape::Mission Load (0.2ms)[0m [1m[34mSELECT "break_escape_missions".* FROM "break_escape_missions" WHERE "break_escape_missions"."id" = ? LIMIT ?[0m [["id", 418560898], ["LIMIT", 1]]
|
||||
[1m[36mBreakEscape::Game Update (0.1ms)[0m [1m[33mUPDATE "break_escape_games" SET "player_state" = ?, "updated_at" = ? WHERE "break_escape_games"."id" = ?[0m [["player_state", "{\"currentRoom\":\"lobby\",\"unlockedRooms\":[\"lobby\"],\"unlockedObjects\":[\"terminal_bluetooth\"],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}"], ["updated_at", "2025-11-21 21:05:48.788450"], ["id", 1]]
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
||||
Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.6ms (5 queries, 0 cached) | GC: 0.0ms)
|
||||
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
||||
|
||||
Binary file not shown.
@@ -491,6 +491,82 @@ module BreakEscape
|
||||
assert_equal false, json['success']
|
||||
end
|
||||
|
||||
# =============================================================================
|
||||
# SECURITY TESTS - CLIENT BYPASS ATTEMPTS
|
||||
# =============================================================================
|
||||
|
||||
test "SECURITY: locked door cannot be bypassed with method='unlocked'" do
|
||||
# This tests the critical vulnerability where client sends method='unlocked'
|
||||
# for a LOCKED door to bypass validation
|
||||
post unlock_game_url(@game), params: {
|
||||
targetType: 'door',
|
||||
targetId: 'office_pin', # This door is LOCKED with PIN
|
||||
attempt: nil,
|
||||
method: 'unlocked' # Client trying to bypass by claiming it's unlocked
|
||||
}
|
||||
|
||||
assert_response :unprocessable_entity,
|
||||
"SECURITY FAIL: Locked door was bypassed by sending method='unlocked'"
|
||||
json = JSON.parse(@response.body)
|
||||
assert_equal false, json['success'],
|
||||
"Server must reject method='unlocked' for locked doors"
|
||||
|
||||
@game.reload
|
||||
assert_not_includes @game.player_state['unlockedRooms'], 'office_pin',
|
||||
"Locked door should NOT be added to unlockedRooms via bypass attempt"
|
||||
end
|
||||
|
||||
test "SECURITY: locked container cannot be bypassed with method='unlocked'" do
|
||||
# This tests the critical vulnerability where client sends method='unlocked'
|
||||
# for a LOCKED container to bypass validation
|
||||
post unlock_game_url(@game), params: {
|
||||
targetType: 'object',
|
||||
targetId: 'safe_pin', # This container is LOCKED with PIN
|
||||
attempt: nil,
|
||||
method: 'unlocked' # Client trying to bypass by claiming it's unlocked
|
||||
}
|
||||
|
||||
assert_response :unprocessable_entity,
|
||||
"SECURITY FAIL: Locked container was bypassed by sending method='unlocked'"
|
||||
json = JSON.parse(@response.body)
|
||||
assert_equal false, json['success'],
|
||||
"Server must reject method='unlocked' for locked containers"
|
||||
|
||||
@game.reload
|
||||
assert_not_includes @game.player_state['unlockedObjects'], 'safe_pin',
|
||||
"Locked container should NOT be added to unlockedObjects via bypass attempt"
|
||||
end
|
||||
|
||||
test "SECURITY: method='unlocked' only works for actually unlocked doors" do
|
||||
# Verify that method='unlocked' DOES work for doors that are actually unlocked
|
||||
post unlock_game_url(@game), params: {
|
||||
targetType: 'door',
|
||||
targetId: 'office_unlocked', # This door is actually unlocked
|
||||
attempt: nil,
|
||||
method: 'unlocked'
|
||||
}
|
||||
|
||||
assert_response :success,
|
||||
"Unlocked doors should work with method='unlocked'"
|
||||
json = JSON.parse(@response.body)
|
||||
assert json['success']
|
||||
end
|
||||
|
||||
test "SECURITY: method='unlocked' only works for actually unlocked containers" do
|
||||
# Verify that method='unlocked' DOES work for containers that are actually unlocked
|
||||
post unlock_game_url(@game), params: {
|
||||
targetType: 'object',
|
||||
targetId: 'chest_unlocked', # This container is actually unlocked
|
||||
attempt: nil,
|
||||
method: 'unlocked'
|
||||
}
|
||||
|
||||
assert_response :success,
|
||||
"Unlocked containers should work with method='unlocked'"
|
||||
json = JSON.parse(@response.body)
|
||||
assert json['success']
|
||||
end
|
||||
|
||||
# =============================================================================
|
||||
# SECURITY TESTS - ENSURE FILTERED DATA
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user