fifa17-recon: /hub refutes yesterday's envelope conclusion, and two ENDPOINT_MAP freezes
Three things: the envelope rule was wrong and is corrected, /hub is settled, and two
documented response shapes that would freeze the client are fixed.
THE CORRECTION. The previous commit concluded that a three-token root consumes `{`, the
first field name and that field's value without dispatching them, so the first key of a
flat body was silently eaten, and that `login` had therefore never been delivered on
POST /user. That is WRONG and is withdrawn, along with the claim that the key order of
the auth dict is load-bearing.
The first call to FUN_1801c7f10 returns token 7 and consumes NO input. It is a
once-only start-of-document token, guarded by the flag at parser+0xda together with the
zero character counter at parser+0x30. So the three tokens are BOF, `{`, and the FIRST
FIELD NAME, and the key loop dispatches from that first key onward. The `== 10` test on
the third token is not an envelope check, it is the empty-object early-out: for `{}` the
third token is END_OBJECT and the root exits with its constructor defaults intact, which
is why answering `{}` has always been safe.
Corrected enum: 7=BOF 9=START_OBJECT 10=END_OBJECT 11=FIELD_NAME 12=START_ARRAY
13=END_ARRAY. The enum itself was right before; the inference from it was not.
HOW IT WAS CAUGHT, which is the part worth keeping. Not by more decompiling. /hub is
served flat and the wrong model predicted its first key would be discarded, so the
prediction was checked against the client's own memory: clubPlayers read back as 205,
the value the server sent, at model+0x1fd70+0x3c with the slide proven against the FNV
prologue first. One live read refuted a chain of otherwise sound static reasoning in
about a minute. tools/hub_counter_probe.py keeps it repeatable.
Consequence worth flagging: a wrapper is not just unnecessary for these roots, it would
be harmful, since a wrapper key hashes to an atom with no arm and the whole object is
skipped. That makes the createPackResponse envelope DOUBTFUL rather than confirmed.
Atom 0xbe has no arm in FUN_180162880. There is no live evidence either way because
nothing has ever parsed that body, so the buy path is left exactly as it is.
TWO ERRORS OF MINE ON THE WAY, both recorded in the doc because both are cheap to
repeat. I searched for RS4:FutGetHubServerResponse, found nothing and reported that no
hub class existed; the class is FutGetHubDataServerResponse (literal 0x18022ce40,
vtable 0x18022cd48, deser 0x1801738b0, control FutSquadSave -> 0x180171a60 matched in
the same run). Then I scanned 152 deserializers for clubPlayers, got zero hits and a
passing control, because the guard is `!= 0x90` and my pattern only matched `== 0x`.
The control passed only because auctionCount happens to use `==`. A control that does
not exercise the same code shape as the target is not a control. The comment already at
utas_server.py:1076 had the hub chain right the whole time.
ENDPOINT_MAP corrections, both freeze-risky as written, neither affecting what we serve
today:
* duplicateItemIdList is an ARRAY OF OBJECTS (element deser 0x180138e10), not the int
list at :1095. Bare ints where the element parser expects objects is a tokenizer
desync, i.e. a hard freeze at 0x1801c7f1a. Control that this is not a misread:
dreamSquads 0xe9 in FutMoveCard genuinely is a bare int array.
* FutDiscardCardServerResponse is {"items":[{"id":N}],"totalCredits":N}. There is no
top-level id.
No behaviour change. utas_server.py is comment-only. 439 contract checks pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -297,19 +297,25 @@ def user_post(h=None):
|
||||
# carrying an empty squad leaves the client with a 0-slot squad model, which is
|
||||
# precisely the state that makes AddPlayerToSquad no-op (see REBUILD_PLAN S9c).
|
||||
#
|
||||
# !! KEY ORDER IS LOAD-BEARING. DO NOT REORDER THIS DICT. !!
|
||||
# CreateUser is a three-token root: the parser consumes `{`, the FIRST field name,
|
||||
# and the token that opens that field's value, all three WITHOUT dispatching them,
|
||||
# and only then starts its key ladder. So whichever key is listed first here is
|
||||
# silently discarded. Today that is `login`, which costs us nothing visible.
|
||||
# Put `userData` first and the client loses the entire user record, with no error
|
||||
# and no log line anywhere. Established 2026-08-05 by decoding the token enum in
|
||||
# FUN_1801c67a0 (9=START_OBJECT 10=END_OBJECT 11=FIELD_NAME 12=START_ARRAY
|
||||
# 13=END_ARRAY); see docs/plan-2026-08-05-pack-opening.md section 2 and
|
||||
# tools/ghidra_queries/q_envelope_{1,2,3}.py.
|
||||
# The probable proper fix is to wrap all five keys one level down inside a single
|
||||
# envelope key, whose NAME the parser never checks. Untested, and it touches the
|
||||
# login path, so it is not done here.
|
||||
# This body is FLAT and that is correct. Every key here is dispatched, including
|
||||
# the first one. Do not "fix" it by wrapping it in an envelope key: CreateUser's
|
||||
# ladder has arms for exactly these five atoms (login 0x1a5, userData 0x36d,
|
||||
# squad 0x2cd, starterPack 0x2e5, bonusPacks 0x5d) and nothing else, so a wrapper
|
||||
# name would hash to an atom with no arm and the whole object would be skipped.
|
||||
#
|
||||
# Why this note exists: an earlier pass on 2026-08-05 claimed the opposite, that
|
||||
# the three tokenizer calls before the key loop consume `{`, the first field name
|
||||
# and its value, so the first key was silently eaten. That was WRONG. The first
|
||||
# call to FUN_1801c7f10 returns token 7 and consumes NO input (once-only branch
|
||||
# guarded by the flag at parser+0xda), so the three tokens are BOF, `{`, and the
|
||||
# FIRST FIELD NAME. The loop dispatches from that first key onward. The `== 10`
|
||||
# test on the third token is just the empty-object early-out for `{}`.
|
||||
# Refuted live rather than on paper: GET /hub is the same flat shape, and its
|
||||
# first key clubPlayers read back as 205 out of the running client at
|
||||
# model+0x1fd70+0x3c, i.e. it reached its arm. Key order here is NOT load-bearing.
|
||||
# Token enum, from FUN_1801c67a0: 7=BOF 9=START_OBJECT 10=END_OBJECT 11=FIELD_NAME
|
||||
# 12=START_ARRAY 13=END_ARRAY. See docs/plan-2026-08-05-pack-opening.md section 2
|
||||
# and tools/ghidra_queries/q_envelope_{1,2,3}.py + q_hub_{1,2,3}.py.
|
||||
return {"login": True, "userData": user_info(),
|
||||
"squad": current_squad(), "starterPack": {}, "bonusPacks": []}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user