The vulnerability lies in the disclosure of a secret key used to restrict psql meta-commands during a restore operation from a PLAIN format dump file. The analysis of the patch 62e2d18b0261f88086db65059a6078db07169f18 reveals that the RestoreMessage.__init__ function in web/pgadmin/tools/restore/__init__.py was modified to prevent this disclosure. Before the fix, this function would construct and log the full restore command, including the sensitive \restrict <key> argument, making the key visible in the process watcher. The patch introduces logic to identify and mask this key before it is logged. Therefore, the RestoreMessage.__init__ function is the vulnerable function as it was responsible for processing and exposing the secret key, which is the root cause of the vulnerability.