On Thu, Dec 24, 2020 at 06:16:20PM -0500, Bruce Momjian wrote:
> On Thu, Dec 24, 2020 at 06:14:49PM -0500, Tom Lane wrote:
>> Bruce Momjian <bruce@momjian.us> writes:
>> > move hex_decode() to /common so it can be called from frontend
>>
>> The buildfarm seems pretty unimpressed with this.
>
> Yes, we are working on reverting the ecpg part.
Looks like the defense put in place by 6b1c5ca has allowed to catch up
a bug here. When base64 has been copied from encode.c to src/common/
for SCRAM (newlines should not be handled by SCRAM, hence the copy),
we have done the same. The copied code just returns -1 for error
paths. For this case, I think that you should also prefix those
functions with "pg_", and also include the encode part for
completeness.
--
Michael