Reject path traversal in the `transformers_weights` config field (#46890)