cat-file: validate remote atoms with an allow-list
strstr() is not enough to validate the format placeholders in remote-object-info causing two errors: 1. Atoms recognized by expand_atom() but the remote doesn't returns 1, but data->type contains garbage causing segfault. 2. expand_atom() returns 0 for unknown atoms, calling strbuf_expand_bad_format() which ends up dying, blocking local queries if the same format is shared. Add an allow-list with the supported atoms at the top of expand_atom(). In remote mode, unsupported atoms return 1 leaving the buffer empty, honoring how for-each-ref handles known but inapplicable atoms. As extra safety, initialize data->type to OBJ_BAD and add a NULL check for type_name() so uninitialized data doesn't cause segfault. Update tests that expect previous die() behavior to expect an empty string and add an explicit test for empty string return on unknown placeholder. Update cat-file command documentation regarding remote-object-info. Mentored-by: Karthik Nayak <karthik.188@gmail.com> Mentored-by: Chandra Pratap <chandrapratap3519@gmail.com> Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>