8000 Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays · postgres/postgres@b28c59a · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script type="application/json" data-target="react-app.embeddedData">{"payload":{"commit":{"oid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","url":"/postgres/postgres/commit/b28c59a6cd089902e66a91e0d0974da34d1c922b","authoredDate":"2025-05-08T22:01:25.000+03:00","committedDate":"2025-05-08T22:01:25.000+03:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eUse 'void *' for arbitrary buffers, 'uint8 *' for byte arrays\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"A 'void *' argument suggests that the caller might pass an arbitrary\nstruct, which is appropriate for functions like libc's read/write, or\npq_sendbytes(). 'uint8 *' is more appropriate for byte arrays that\nhave no structure, like the cancellation keys or SCRAM tokens. Some\nplaces used 'char *', but 'uint8 *' is better because 'char *' is\ncommonly used for null-terminated strings. Change code around SCRAM,\nMD5 authentication, and cancellation key handling to follow these\nconventions.\n\nDiscussion: \u003ca href=\"https://www.postgresql.org/message-id/61be9e31-7b7d-49d5-bc11-721800d89d64@eisentraut.org\" rel=\"nofollow\"\u003ehttps://www.postgresql.org/message-id/61be9e31-7b7d-49d5-bc11-721800d89d64@eisentraut.org\u003c/a\u003e","authors":[{"login":"hlinnaka","displayName":"Heikki Linnakangas","avatarUrl":"https://avatars.githubusercontent.com/u/191602?v=4","path":"/hlinnaka","isGitHub":false}],"committerAttribution":false,"committer":{"login":"hlinnaka","displayName":"Heikki Linnakangas","avatarUrl":"https://avatars.githubusercontent.com/u/191602?v=4","path":"/hlinnaka","isGitHub":false},"parents":["965213d9c56a671086525a65f5427653b4a66350"],"globalRelayId":"C_kwDOAA4m0toAKGIyOGM1OWE2Y2QwODk5MDJlNjZhOTFlMGQwOTc0ZGEzNGQxYzkyMmI","sha1":"965213d9c56a671086525a65f5427653b4a66350","sha2":"b28c59a6cd089902e66a91e0d0974da34d1c922b"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":3217,"text":"@@ -3218,7 +3218,7 @@ appendSCRAMKeysInfo(StringInfo buf)","html":"@@ -3218,7 +3218,7 @@ appendSCRAMKeysInfo(StringInfo buf)","displayNoNewLineWarning":false,"position":0,"left":3217,"right":3217},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3218,"text":" \tlen = pg_b64_enc_len(sizeof(MyProcPort-\u003escram_ClientKey));","html":" \t\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ClientKey\u003c/span\u003e));","displayNoNewLineWarning":false,"position":1,"left":3218,"right":3218},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3219,"text":" \t/* don't forget the zero-terminator */","html":" \t\u003cspan class=pl-c\u003e/* don\u0026#39;t forget the zero-terminator */\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":3219,"right":3219},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3220,"text":" \tclient_key = palloc0(len + 1);","html":" \t\u003cspan class=pl-s1\u003eclient_key\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc0\u003c/span\u003e(\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":3220,"right":3220},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3221,"text":"-\tencoded_len = pg_b64_encode((const char *) MyProcPort-\u003escram_ClientKey,","html":"-\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-k x\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ClientKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":3221,"right":3220},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3221,"text":"+\tencoded_len = pg_b64_encode(MyProcPort-\u003escram_ClientKey,","html":"+\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ClientKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":3221,"right":3221},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3222,"text":" \t\t\t\t\t\t\t\tsizeof(MyProcPort-\u003escram_ClientKey),","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ClientKey\u003c/span\u003e),","displayNoNewLineWarning":false,"position":6,"left":3222,"right":3222},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3223,"text":" \t\t\t\t\t\t\t\tclient_key, len);","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eclient_key\u003c/span\u003e, \u003cspan class=pl-s1\u003elen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":3223,"right":3223},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3224,"text":" \tif (encoded_len \u003c 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eencoded_len\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":8,"left":3224,"right":3224},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3226,"text":"@@ -3227,7 +3227,7 @@ appendSCRAMKeysInfo(StringInfo buf)","html":"@@ -3227,7 +3227,7 @@ appendSCRAMKeysInfo(StringInfo buf)","displayNoNewLineWarning":false,"position":9,"left":3226,"right":3226},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3227,"text":" \tlen = pg_b64_enc_len(sizeof(MyProcPort-\u003escram_ServerKey));","html":" \t\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ServerKey\u003c/span\u003e));","displayNoNewLineWarning":false,"position":10,"left":3227,"right":3227},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3228,"text":" \t/* don't forget the zero-terminator */","html":" \t\u003cspan class=pl-c\u003e/* don\u0026#39;t forget the zero-terminator */\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":3228,"right":3228},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3229,"text":" \tserver_key = palloc0(len + 1);","html":" \t\u003cspan class=pl-s1\u003eserver_key\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc0\u003c/span\u003e(\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":12,"left":3229,"right":3229},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3230,"text":"-\tencoded_len = pg_b64_encode((const char *) MyProcPort-\u003escram_ServerKey,","html":"-\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-k x\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ServerKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":3230,"right":3229},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3230,"text":"+\tencoded_len = pg_b64_encode(MyProcPort-\u003escram_ServerKey,","html":"+\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ServerKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":14,"left":3230,"right":3230},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3231,"text":" \t\t\t\t\t\t\t\tsizeof(MyProcPort-\u003escram_ServerKey),","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ServerKey\u003c/span\u003e),","displayNoNewLineWarning":false,"position":15,"left":3231,"right":3231},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3232,"text":" \t\t\t\t\t\t\t\tserver_key, len);","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eserver_key\u003c/span\u003e, \u003cspan class=pl-s1\u003elen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":16,"left":3232,"right":3232},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3233,"text":" \tif (encoded_len \u003c 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eencoded_len\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":17,"left":3233,"right":3233}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3267,"linesChanged":4,"newTreeEntry":{"lineCount":3267,"path":"contrib/dblink/dblink.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"contrib/dblink/dblink.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"contrib/dblink/dblink.c","pathDigest":"54593f080c0fd65965d885e53613683ee447e95dcd5176d9121663a391fc42cf","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":576,"text":"@@ -577,7 +577,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)","html":"@@ -577,7 +577,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)","displayNoNewLineWarning":false,"position":0,"left":576,"right":576},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":577,"text":" \t\t\tlen = pg_b64_enc_len(sizeof(MyProcPort-\u003escram_ClientKey));","html":" \t\t\t\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ClientKey\u003c/span\u003e));","displayNoNewLineWarning":false,"position":1,"left":577,"right":577},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":578,"text":" \t\t\t/* don't forget the zero-terminator */","html":" \t\t\t\u003cspan class=pl-c\u003e/* don\u0026#39;t forget the zero-terminator */\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":578,"right":578},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":579,"text":" \t\t\tvalues[n] = palloc0(len + 1);","html":" \t\t\t\u003cspan class=pl-s1\u003evalues\u003c/span\u003e[\u003cspan class=pl-s1\u003en\u003c/span\u003e] \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc0\u003c/span\u003e(\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":579,"right":579},{"stylingDirective":null,"type":"DELETION","blobLineNumber":580,"text":"-\t\t\tencoded_len = pg_b64_encode((const char *) MyProcPort-\u003escram_ClientKey,","html":"-\t\t\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-k x\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ClientKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":580,"right":579},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":580,"text":"+\t\t\tencoded_len = pg_b64_encode(MyProcPort-\u003escram_ClientKey,","html":"+\t\t\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ClientKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":580,"right":580},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":581,"text":" \t\t\t\t\t\t\t\t\t\tsizeof(MyProcPort-\u003escram_ClientKey),","html":" \t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ClientKey\u003c/span\u003e),","displayNoNewLineWarning":false,"position":6,"left":581,"right":581},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":582,"text":" \t\t\t\t\t\t\t\t\t\t(char *) values[n], len);","html":" \t\t\t\t\t\t\t\t\t\t(\u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003evalues\u003c/span\u003e[\u003cspan class=pl-s1\u003en\u003c/span\u003e], \u003cspan class=pl-s1\u003elen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":582,"right":582},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":583,"text":" \t\t\tif (encoded_len \u003c 0)","html":" \t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eencoded_len\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":8,"left":583,"right":583},{"stylingDirective":null,"type":"HUNK","blobLineNumber":587,"text":"@@ -588,7 +588,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)","html":"@@ -588,7 +588,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)","displayNoNewLineWarning":false,"position":9,"left":587,"right":587},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":588,"text":" \t\t\tlen = pg_b64_enc_len(sizeof(MyProcPort-\u003escram_ServerKey));","html":" \t\t\t\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ServerKey\u003c/span\u003e));","displayNoNewLineWarning":false,"position":10,"left":588,"right":588},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":589,"text":" \t\t\t/* don't forget the zero-terminator */","html":" \t\t\t\u003cspan class=pl-c\u003e/* don\u0026#39;t forget the zero-terminator */\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":589,"right":589},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":590,"text":" \t\t\tvalues[n] = palloc0(len + 1);","html":" \t\t\t\u003cspan class=pl-s1\u003evalues\u003c/span\u003e[\u003cspan class=pl-s1\u003en\u003c/span\u003e] \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc0\u003c/span\u003e(\u003cspan class=pl-s1\u003elen\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":12,"left":590,"right":590},{"stylingDirective":null,"type":"DELETION","blobLineNumber":591,"text":"-\t\t\tencoded_len = pg_b64_encode((const char *) MyProcPort-\u003escram_ServerKey,","html":"-\t\t\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-k x\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ServerKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":591,"right":590},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":591,"text":"+\t\t\tencoded_len = pg_b64_encode(MyProcPort-\u003escram_ServerKey,","html":"+\t\t\t\u003cspan class=\"pl-s1\"\u003eencoded_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eMyProcPort\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escram_ServerKey\u003c/span\u003e,","displayNoNewLineWarning":false,"position":14,"left":591,"right":591},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":592,"text":" \t\t\t\t\t\t\t\t\t\tsizeof(MyProcPort-\u003escram_ServerKey),","html":" \t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escram_ServerKey\u003c/span\u003e),","displayNoNewLineWarning":false,"position":15,"left":592,"right":592},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":593,"text":" \t\t\t\t\t\t\t\t\t\t(char *) values[n], len);","html":" \t\t\t\t\t\t\t\t\t\t(\u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003evalues\u003c/span\u003e[\u003cspan class=pl-s1\u003en\u003c/span\u003e], \u003cspan class=pl-s1\u003elen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":16,"left":593,"right":593},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":594,"text":" \t\t\tif (encoded_len \u003c 0)","html":" \t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eencoded_len\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":17,"left":594,"right":594}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":2563,"linesChanged":4,"newTreeEntry":{"lineCount":2563,"path":"contrib/postgres_fdw/connection.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"contrib/postgres_fdw/connection.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"contrib/postgres_fdw/connection.c","pathDigest":"d91ab86f9aa483159a94b96333acf0771174d3bff4050e5fc9f978084ee08f5f","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":157,"text":"@@ -158,7 +158,7 @@ typedef struct","html":"@@ -158,7 +158,7 @@ typedef struct","displayNoNewLineWarning":false,"position":0,"left":157,"right":157},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":158,"text":" \t/* Fields from the last message from client */","html":" \t\u003cspan class=pl-c\u003e/* Fields from the last message from client */\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":158,"right":158},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":159,"text":" \tchar\t *client_final_message_without_proof;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003eclient_final_message_without_proof\u003c/span\u003e;","displayNoNewLineWarning":false,"position":2,"left":159,"right":159},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":160,"text":" \tchar\t *client_final_nonce;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003eclient_final_nonce\u003c/span\u003e;","displayNoNewLineWarning":false,"position":3,"left":160,"right":160},{"stylingDirective":null,"type":"DELETION","blobLineNumber":161,"text":"-\tchar\t\tClientProof[SCRAM_MAX_KEY_LEN];","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t\t\u003cspan class=\"pl-c1\"\u003eClientProof\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eSCRAM_MAX_KEY_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":4,"left":161,"right":160},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":161,"text":"+\tuint8\t\tClientProof[SCRAM_MAX_KEY_LEN];","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t\t\u003cspan class=\"pl-c1\"\u003eClientProof\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eSCRAM_MAX_KEY_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":5,"left":161,"right":161},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":162,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":162,"right":162},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":163,"text":" \t/* Fields generated in the server */","html":" \t\u003cspan class=pl-c\u003e/* Fields generated in the server */\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":163,"right":163},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":164,"text":" \tchar\t *server_first_message;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003eserver_first_message\u003c/span\u003e;","displayNoNewLineWarning":false,"position":8,"left":164,"right":164},{"stylingDirective":null,"type":"HUNK","blobLineNumber":185,"text":"@@ -186,9 +186,9 @@ static void mock_scram_secret(const char *username, pg_cryptohash_type *hash_typ","html":"@@ -186,9 +186,9 @@ static void mock_scram_secret(const char *username, pg_cryptohash_type *hash_typ","displayNoNewLineWarning":false,"position":9,"left":185,"right":185},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":186,"text":" static bool is_scram_printable(char *p);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-en\u003eis_scram_printable\u003c/span\u003e(\u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ep\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":186,"right":186},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":187,"text":" static char *sanitize_char(char c);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-en\u003esanitize_char\u003c/span\u003e(\u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003ec\u003c/span\u003e);","displayNoNewLineWarning":false,"position":11,"left":187,"right":187},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":188,"text":" static char *sanitize_str(const char *s);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-en\u003esanitize_str\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003es\u003c/span\u003e);","displayNoNewLineWarning":false,"position":12,"left":188,"right":188},{"stylingDirective":null,"type":"DELETION","blobLineNumber":189,"text":"-static char *scram_mock_salt(const char *username,","html":"-\u003cspan class=\"pl-k\"\u003estatic\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-en\"\u003escram_mock_salt\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eusername\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":189,"right":188},{"stylingDirective":null,"type":"DELETION","blobLineNumber":190,"text":"-\t\t\t\t\t\t\t pg_cryptohash_type hash_type,","html":"-\t\t\t\t\t\t\t \u003cspan class=\"pl-smi\"\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ehash_type\u003c/span\u003e,","displayNoNewLineWarning":false,"position":14,"left":190,"right":188},{"stylingDirective":null,"type":"DELETION","blobLineNumber":191,"text":"-\t\t\t\t\t\t\t int key_length);","html":"-\t\t\t\t\t\t\t \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ekey_length\u003c/span\u003e);","displayNoNewLineWarning":false,"position":15,"left":191,"right":188},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":189,"text":"+static uint8 *scram_mock_salt(const char *username,","html":"+\u003cspan class=\"pl-k\"\u003estatic\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-en\"\u003escram_mock_salt\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eusername\u003c/span\u003e,","displayNoNewLineWarning":false,"position":16,"left":191,"right":189},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":190,"text":"+\t\t\t\t\t\t\t pg_cryptohash_type hash_type,","html":"+\t\t\t\t\t\t\t \u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi\"\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ehash_type\u003c/span\u003e,","displayNoNewLineWarning":false,"position":17,"left":191,"right":190},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":191,"text":"+\t\t\t\t\t\t\t int key_length);","html":"+\t\t\t\t\t\t\t \u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ekey_length\u003c/span\u003e);","displayNoNewLineWarning":false,"position":18,"left":191,"right":191},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":192,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":19,"left":192,"right":192},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":193,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":193,"right":193},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":194,"text":" * The number of iterations to use when generating new secrets.","html":" \u003cspan class=pl-c\u003e * The number of iterations to use when generating new secrets.\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":194,"right":194},{"stylingDirective":null,"type":"HUNK","blobLineNumber":483,"text":"@@ -484,7 +484,7 @@ pg_be_scram_build_secret(const char *password)","html":"@@ -484,7 +484,7 @@ pg_be_scram_build_secret(const char *password)","displayNoNewLineWarning":false,"position":22,"left":483,"right":483},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":484,"text":" {","html":" {","displayNoNewLineWarning":false,"position":23,"left":484,"right":484},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":485,"text":" \tchar\t *prep_password;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eprep_password\u003c/span\u003e;","displayNoNewLineWarning":false,"position":24,"left":485,"right":485},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":486,"text":" \tpg_saslprep_rc rc;","html":" \t\u003cspan class=pl-smi\u003epg_saslprep_rc\u003c/span\u003e \u003cspan class=pl-s1\u003erc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":25,"left":486,"right":486},{"stylingDirective":null,"type":"DELETION","blobLineNumber":487,"text":"-\tchar\t\tsaltbuf[SCRAM_DEFAULT_SALT_LEN];","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003esaltbuf\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eSCRAM_DEFAULT_SALT_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":26,"left":487,"right":486},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":487,"text":"+\tuint8\t\tsaltbuf[SCRAM_DEFAULT_SALT_LEN];","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003esaltbuf\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eSCRAM_DEFAULT_SALT_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":27,"left":487,"right":487},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":488,"text":" \tchar\t *result;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":28,"left":488,"right":488},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":489,"text":" \tconst char *errstr = NULL;","html":" \t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\ 8000 u003c/span\u003e;","displayNoNewLineWarning":false,"position":29,"left":489,"right":489},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":490,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":30,"left":490,"right":490},{"stylingDirective":null,"type":"HUNK","blobLineNumber":523,"text":"@@ -524,7 +524,7 @@ scram_verify_plain_password(const char *username, const char *password,","html":"@@ -524,7 +524,7 @@ scram_verify_plain_password(const char *username, const char *password,","displayNoNewLineWarning":false,"position":31,"left":523,"right":523},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":524,"text":" \t\t\t\t\t\t\tconst char *secret)","html":" \t\t\t\t\t\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esecret\u003c/span\u003e)","displayNoNewLineWarning":false,"position":32,"left":524,"right":524},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":525,"text":" {","html":" {","displayNoNewLineWarning":false,"position":33,"left":525,"right":525},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":526,"text":" \tchar\t *encoded_salt;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eencoded_salt\u003c/span\u003e;","displayNoNewLineWarning":false,"position":34,"left":526,"right":526},{"stylingDirective":null,"type":"DELETION","blobLineNumber":527,"text":"-\tchar\t *salt;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e;","displayNoNewLineWarning":false,"position":35,"left":527,"right":526},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":527,"text":"+\tuint8\t *salt;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e;","displayNoNewLineWarning":false,"position":36,"left":527,"right":527},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":528,"text":" \tint\t\t\tsaltlen;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003esaltlen\u003c/span\u003e;","displayNoNewLineWarning":false,"position":37,"left":528,"right":528},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":529,"text":" \tint\t\t\titerations;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eiterations\u003c/span\u003e;","displayNoNewLineWarning":false,"position":38,"left":529,"right":529},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":530,"text":" \tint\t\t\tkey_length = 0;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":39,"left":530,"right":530},{"stylingDirective":null,"type":"HUNK","blobLineNumber":608,"text":"@@ -609,9 +609,9 @@ parse_scram_secret(const char *secret, int *iterations,","html":"@@ -609,9 +609,9 @@ parse_scram_secret(const char *secret, int *iterations,","displayNoNewLineWarning":false,"position":40,"left":608,"right":608},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":609,"text":" \tchar\t *storedkey_str;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003estoredkey_str\u003c/span\u003e;","displayNoNewLineWarning":false,"position":41,"left":609,"right":609},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":610,"text":" \tchar\t *serverkey_str;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eserverkey_str\u003c/span\u003e;","displayNoNewLineWarning":false,"position":42,"left":610,"right":610},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":611,"text":" \tint\t\t\tdecoded_len;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003edecoded_len\u003c/span\u003e;","displayNoNewLineWarning":false,"position":43,"left":611,"right":611},{"stylingDirective":null,"type":"DELETION","blobLineNumber":612,"text":"-\tchar\t *decoded_salt_buf;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edecoded_salt_buf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":44,"left":612,"right":611},{"stylingDirective":null,"type":"DELETION","blobLineNumber":613,"text":"-\tchar\t *decoded_stored_buf;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edecoded_stored_buf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":45,"left":613,"right":611},{"stylingDirective":null,"type":"DELETION","blobLineNumber":614,"text":"-\tchar\t *decoded_server_buf;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edecoded_server_buf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":46,"left":614,"right":611},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":612,"text":"+\tuint8\t *decoded_salt_buf;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edecoded_salt_buf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":47,"left":614,"right":612},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":613,"text":"+\tuint8\t *decoded_stored_buf;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edecoded_stored_buf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":48,"left":614,"right":613},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":614,"text":"+\tuint8\t *decoded_server_buf;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edecoded_server_buf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":49,"left":614,"right":614},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":615,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":50,"left":615,"right":615},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":616,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":51,"left":616,"right":616},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":617,"text":" \t * The secret is of form:","html":" \u003cspan class=pl-c\u003e\t * The secret is of form:\u003c/span\u003e","displayNoNewLineWarning":false,"position":52,"left":617,"right":617},{"stylingDirective":null,"type":"HUNK","blobLineNumber":697,"text":"@@ -698,7 +698,7 @@ mock_scram_secret(const char *username, pg_cryptohash_type *hash_type,","html":"@@ -698,7 +698,7 @@ mock_scram_secret(const char *username, pg_cryptohash_type *hash_type,","displayNoNewLineWarning":false,"position":53,"left":697,"right":697},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":698,"text":" \t\t\t\t int *iterations, int *key_length, char **salt,","html":" \t\t\t\t \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eiterations\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esalt\u003c/span\u003e,","displayNoNewLineWarning":false,"position":54,"left":698,"right":698},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":699,"text":" \t\t\t\t uint8 *stored_key, uint8 *server_key)","html":" \t\t\t\t \u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003estored_key\u003c/span\u003e, \u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eserver_key\u003c/span\u003e)","displayNoNewLineWarning":false,"position":55,"left":699,"right":699},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":700,"text":" {","html":" {","displayNoNewLineWarning":false,"position":56,"left":700,"right":700},{"stylingDirective":null,"type":"DELETION","blobLineNumber":701,"text":"-\tchar\t *raw_salt;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eraw_salt\u003c/span\u003e;","displayNoNewLineWarning":false,"position":57,"left":701,"right":700},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":701,"text":"+\tuint8\t *raw_salt;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eraw_salt\u003c/span\u003e;","displayNoNewLineWarning":false,"position":58,"left":701,"right":701},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":702,"text":" \tchar\t *encoded_salt;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eencoded_salt\u003c/span\u003e;","displayNoNewLineWarning":false,"position":59,"left":702,"right":702},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":703,"text":" \tint\t\t\tencoded_len;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eencoded_len\u003c/span\u003e;","displayNoNewLineWarning":false,"position":60,"left":703,"right":703},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":704,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":61,"left":704,"right":704},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1230,"text":"@@ -1231,7 +1231,7 @@ build_server_first_message(scram_state *state)","html":"@@ -1231,7 +1231,7 @@ build_server_first_message(scram_state *state)","displayNoNewLineWarning":false,"position":62,"left":1230,"right":1230},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1231,"text":" \t * For convenience, however, we don't use the whole range available,","html":" \u003cspan class=pl-c\u003e\t * For convenience, however, we don\u0026#39;t use the whole range available,\u003c/span\u003e","displayNoNewLineWarning":false,"position":63,"left":1231,"right":1231},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1232,"text":" \t * rather, we generate some random bytes, and base64 encode them.","html":" \u003cspan class=pl-c\u003e\t * rather, we generate some random bytes, and base64 encode them.\u003c/span\u003e","displayNoNewLineWarning":false,"position":64,"left":1232,"right":1232},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1233,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":65,"left":1233,"right":1233},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1234,"text":"-\tchar\t\traw_nonce[SCRAM_RAW_NONCE_LEN];","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003eraw_nonce\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eSCRAM_RAW_NONCE_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":66,"left":1234,"right":1233},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1234,"text":"+\tuint8\t\traw_nonce[SCRAM_RAW_NONCE_LEN];","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003eraw_nonce\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eSCRAM_RAW_NONCE_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":67,"left":1234,"right":1234},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1235,"text":" \tint\t\t\tencoded_len;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eencoded_len\u003c/span\u003e;","displayNoNewLineWarning":false,"position":68,"left":1235,"right":1235},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1236,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":69,"left":1236,"right":1236},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1237,"text":" \tif (!pg_strong_random(raw_nonce, SCRAM_RAW_NONCE_LEN))","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-en\u003epg_strong_random\u003c/span\u003e(\u003cspan class=pl-s1\u003eraw_nonce\u003c/span\u003e, \u003cspan class=pl-c1\u003eSCRAM_RAW_NONCE_LEN\u003c/span\u003e))","displayNoNewLineWarning":false,"position":70,"left":1237,"right":1237},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1270,"text":"@@ -1271,7 +1271,7 @@ read_client_final_message(scram_state *state, const char *input)","html":"@@ -1271,7 +1271,7 @@ read_client_final_message(scram_state *state, const char *input)","displayNoNewLineWarning":false,"position":71,"left":1270,"right":1270},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1271,"text":" \tchar\t *begin,","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ebegin\u003c/span\u003e,","displayNoNewLineWarning":false,"position":72,"left":1271,"right":1271},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1272,"text":" \t\t\t *proof;","html":" \t\t\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eproof\u003c/span\u003e;","displayNoNewLineWarning":false,"position":73,"left":1272,"right":1272},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1273,"text":" \tchar\t *p;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ep\u003c/span\u003e;","displayNoNewLineWarning":false,"position":74,"left":1273,"right":1273},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1274,"text":"-\tchar\t *client_proof;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eclient_proof\u003c/span\u003e;","displayNoNewLineWarning":false,"position":75,"left":1274,"right":1273},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1274,"text":"+\tuint8\t *client_proof;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eclient_proof\u003c/span\u003e;","displayNoNewLineWarning":false,"position":76,"left":1274,"right":1274},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1275,"text":" \tint\t\t\tclient_proof_len;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eclient_proof_len\u003c/span\u003e;","displayNoNewLineWarning":false,"position":77,"left":1275,"right":1275},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1276,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":78,"left":1276,"right":1276},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1277,"text":" \tbegin = p = pstrdup(input);","html":" \t\u003cspan class=pl-s1\u003ebegin\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003ep\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epstrdup\u003c/span\u003e(\u003cspan class=pl-s1\u003einput\u003c/span\u003e);","displayNoNewLineWarning":false,"position":79,"left":1277,"right":1277},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1339,"text":"@@ -1340,7 +1340,7 @@ read_client_final_message(scram_state *state, const char *input)","html":"@@ -1340,7 +1340,7 @@ read_client_final_message(scram_state *state, const char *input)","displayNoNewLineWarning":false,"position":80,"left":1339,"right":1339},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1340,"text":" \t\tb64_message_len = pg_b64_enc_len(cbind_input_len);","html":" \t\t\u003cspan class=pl-s1\u003eb64_message_len\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-s1\u003ecbind_input_len\u003c/span\u003e);","displayNoNewLineWarning":false,"position":81,"left":1340,"right":1340},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1341,"text":" \t\t/* don't forget the zero-terminator */","html":" \t\t\u003cspan class=pl-c\u003e/* don\u0026#39;t forget the zero-terminator */\u003c/span\u003e","displayNoNewLineWarning":false,"position":82,"left":1341,"right":1341},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1342,"text":" \t\tb64_message = palloc(b64_message_len + 1);","html":" \t\t\u003cspan class=pl-s1\u003eb64_message\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc\u003c/span\u003e(\u003cspan class=pl-s1\u003eb64_message_len\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":83,"left":1342,"right":1342},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1343,"text":"-\t\tb64_message_len = pg_b64_encode(cbind_input, cbind_input_len,","html":"-\t\t\u003cspan class=\"pl-s1\"\u003eb64_message_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ecbind_input\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecbind_input_len\u003c/span\u003e,","displayNoNewLineWarning":false,"position":84,"left":1343,"right":1342},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1343,"text":"+\t\tb64_message_len = pg_b64_encode((uint8 *) cbind_input, cbind_input_len,","html":"+\t\t\u003cspan class=\"pl-s1\"\u003eb64_message_len\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003euint8\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecbind_input\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecbind_input_len\u003c/span\u003e,","displayNoNewLineWarning":false,"position":85,"left":1343,"right":1343},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1344,"text":" \t\t\t\t\t\t\t\t\t\tb64_message, b64_message_len);","html":" \t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eb64_message\u003c/span\u003e, \u003cspan class=pl-s1\u003eb64_message_len\u003c/span\u003e);","displayNoNewLineWarning":false,"position":86,"left":1344,"right":1344},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1345,"text":" \t\tif (b64_message_len \u003c 0)","html":" \t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eb64_message_len\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":87,"left":1345,"right":1345},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1346,"text":" \t\t\telog(ERROR, \"could not encode channel binding data\");","html":" \t\t\t\u003cspan class=pl-en\u003eelog\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;could not encode channel binding data\u0026quot;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":88,"left":1346,"right":1346},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1439,"text":"@@ -1440,7 +1440,7 @@ build_server_final_message(scram_state *state)","html":"@@ -1440,7 +1440,7 @@ build_server_final_message(scram_state *state)","displayNoNewLineWarning":false,"position":89,"left":1439,"right":1439},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1440,"text":" \tsiglen = pg_b64_enc_len(state-\u003ekey_length);","html":" \t\u003cspan class=pl-s1\u003esiglen\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-s1\u003estate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ekey_length\u003c/span\u003e);","displayNoNewLineWarning":false,"position":90,"left":1440,"right":1440},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1441,"text":" \t/* don't forget the zero-terminator */","html":" \t\u003cspan class=pl-c\u003e/* don\u0026#39;t forget the zero-terminator */\u003c/span\u003e","displayNoNewLineWarning":false,"position":91,"left":1441,"right":1441},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1442,"text":" \tserver_signature_base64 = palloc(siglen + 1);","html":" \t\u003cspan class=pl-s1\u003eserver_signature_base64\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc\u003c/span\u003e(\u003cspan class=pl-s1\u003esiglen\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":92,"left":1442,"right":1442},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1443,"text":"-\tsiglen = pg_b64_encode((const char *) ServerSignature,","html":"-\t\u003cspan class=\"pl-s1\"\u003esiglen\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-k x\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eServerSignature\u003c/span\u003e,","displayNoNewLineWarning":false,"position":93,"left":1443,"right":1442},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1443,"text":"+\tsiglen = pg_b64_encode(ServerSignature,","html":"+\t\u003cspan class=\"pl-s1\"\u003esiglen\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eServerSignature\u003c/span\u003e,","displayNoNewLineWarning":false,"position":94,"left":1443,"right":1443},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1444,"text":" \t\t\t\t\t\t state-\u003ekey_length, server_signature_base64,","html":" \t\t\t\t\t\t \u003cspan class=pl-s1\u003estate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ekey_length\u003c/span\u003e, \u003cspan class=pl-s1\u003eserver_signature_base64\u003c/span\u003e,","displayNoNewLineWarning":false,"position":95,"left":1444,"right":1444},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1445,"text":" \t\t\t\t\t\t siglen);","html":" \t\t\t\t\t\t \u003cspan class=pl-s1\u003esiglen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":96,"left":1445,"right":1445},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1446,"text":" \tif (siglen \u003c 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003esiglen\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":97,"left":1446,"right":1446},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1466,"text":"@@ -1467,7 +1467,7 @@ build_server_final_message(scram_state *state)","html":"@@ -1467,7 +1467,7 @@ build_server_final_message(scram_state *state)","displayNoNewLineWarning":false,"position":98,"left":1466,"right":1466},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1467,"text":" * hash based on the username and a cluster-level secret key. Returns a","html":" \u003cspan class=pl-c\u003e * hash based on the username and a cluster-level secret key. Returns a\u003c/span\u003e","displayNoNewLineWarning":false,"position":99,"left":1467,"right":1467},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1468,"text":" * pointer to a static buffer of size SCRAM_DEFAULT_SALT_LEN, or NULL.","html":" \u003cspan class=pl-c\u003e * pointer to a static buffer of size SCRAM_DEFAULT_SALT_LEN, or NULL.\u003c/span\u003e","displayNoNewLineWarning":false,"position":100,"left":1468,"right":1468},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1469,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":101,"left":1469,"right":1469},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1470,"text":"-static char *","html":"-\u003cspan class=\"pl-k\"\u003estatic\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e","displayNoNewLineWarning":false,"position":102,"left":1470,"right":1469},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1470,"text":"+static uint8 *","html":"+\u003cspan class=\"pl-k\"\u003estatic\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e","displayNoNewLineWarning":false,"position":103,"left":1470,"right":1470},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1471,"text":" scram_mock_salt(const char *username, pg_cryptohash_type hash_type,","html":" \u003cspan class=pl-en\u003escram_mock_salt\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eusername\u003c/span\u003e, \u003cspan class=pl-smi\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=pl-s1\u003ehash_type\u003c/span\u003e,","displayNoNewLineWarning":false,"position":104,"left":1471,"right":1471},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1472,"text":" \t\t\t\tint key_length)","html":" \t\t\t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e)","displayNoNewLineWarning":false,"position":105,"left":1472,"right":1472},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1473,"text":" {","html":" {","displayNoNewLineWarning":false,"position":106,"left":1473,"right":1473},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1500,"text":"@@ -1501,5 +1501,5 @@ scram_mock_salt(const char *username, pg_cryptohash_type hash_type,","html":"@@ -1501,5 +1501,5 @@ scram_mock_salt(const char *username, pg_cryptohash_type hash_type,","displayNoNewLineWarning":false,"position":107,"left":1500,"right":1500},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1501,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":108,"left":1501,"right":1501},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1502,"text":" \tpg_cryptohash_free(ctx);","html":" \t\u003cspan class=pl-en\u003epg_cryptohash_free\u003c/span\u003e(\u003cspan class=pl-s1\u003ectx\u003c/span\u003e);","displayNoNewLineWarning":false,"position":109,"left":1502,"right":1502},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1503,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":110,"left":1503,"right":1503},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1504,"text":"-\treturn (char *) sha_digest;","html":"-\t\u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esha_digest\u003c/span\u003e;","displayNoNewLineWarning":false,"position":111,"left":1504,"right":1503},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1504,"text":"+\treturn sha_digest;","html":"+\t\u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esha_digest\u003c/span\u003e;","displayNoNewLineWarning":false,"position":112,"left":1504,"right":1504},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1505,"text":" }","html":" }","displayNoNewLineWarning":false,"position":113,"left":1505,"right":1505}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1505,"linesChanged":32,"newTreeEntry":{"lineCount":1505,"path":"src/backend/libpq/auth-scram.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/libpq/auth-scram.c","mode":100644},"linesAdded":16,"linesDeleted":16,"path":"src/backend/libpq/auth-scram.c","pathDigest":"999cd3e9853776a9ce8c01610796bb1325360f1bee7e6c76fb73be8f240ff7bc","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":665,"text":"@@ -666,7 +666,7 @@ ClientAuthentication(Port *port)","html":"@@ -666,7 +666,7 @@ ClientAuthentication(Port *port)","displayNoNewLineWarning":false,"position":0,"left":665,"right":665},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":666,"text":" * Send an authentication request packet to the frontend.","html":" \u003cspan class=pl-c\u003e * Send an authentication request packet to the frontend.\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":666,"right":666},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":667,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":667,"right":667},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":668,"text":" void","html":" \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":668,"right":668},{"stylingDirective":null,"type":"DELETION","blobLineNumber":669,"text":"-sendAuthRequest(Port *port, AuthRequest areq, const char *extradata, int extralen)","html":"-\u003cspan class=\"pl-en\"\u003esendAuthRequest\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003ePort\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eport\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eAuthRequest\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eareq\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eextradata\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eextralen\u003c/span\u003e)","displayNoNewLineWarning":false,"position":4,"left":669,"right":668},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":669,"text":"+sendAuthRequest(Port *port, AuthRequest areq, const void *extradata, int extralen)","html":"+\u003cspan class=\"pl-en\"\u003esendAuthRequest\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003ePort\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eport\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eAuthRequest\ 8000 u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eareq\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eextradata\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eextralen\u003c/span\u003e)","displayNoNewLineWarning":false,"position":5,"left":669,"right":669},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":670,"text":" {","html":" {","displayNoNewLineWarning":false,"position":6,"left":670,"right":670},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":671,"text":" \tStringInfoData buf;","html":" \t\u003cspan class=pl-smi\u003eStringInfoData\u003c/span\u003e \u003cspan class=pl-s1\u003ebuf\u003c/span\u003e;","displayNoNewLineWarning":false,"position":7,"left":671,"right":671},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":672,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":672,"right":672},{"stylingDirective":null,"type":"HUNK","blobLineNumber":873,"text":"@@ -874,7 +874,7 @@ CheckPWChallengeAuth(Port *port, const char **logdetail)","html":"@@ -874,7 +874,7 @@ CheckPWChallengeAuth(Port *port, const char **logdetail)","displayNoNewLineWarning":false,"position":9,"left":873,"right":873},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":874,"text":" static int","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":874,"right":874},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":875,"text":" CheckMD5Auth(Port *port, char *shadow_pass, const char **logdetail)","html":" \u003cspan class=pl-en\u003eCheckMD5Auth\u003c/span\u003e(\u003cspan class=pl-smi\u003ePort\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eport\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eshadow_pass\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elogdetail\u003c/span\u003e)","displayNoNewLineWarning":false,"position":11,"left":875,"right":875},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":876,"text":" {","html":" {","displayNoNewLineWarning":false,"position":12,"left":876,"right":876},{"stylingDirective":null,"type":"DELETION","blobLineNumber":877,"text":"-\tchar\t\tmd5Salt[4];\t\t/* Password salt */","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003emd5Salt\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003e4\u003c/span\u003e];\t\t\u003cspan class=\"pl-c\"\u003e/* Password salt */\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":877,"right":876},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":877,"text":"+\tuint8\t\tmd5Salt[4];\t\t/* Password salt */","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003emd5Salt\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003e4\u003c/span\u003e];\t\t\u003cspan class=\"pl-c\"\u003e/* Password salt */\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":877,"right":877},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":878,"text":" \tchar\t *passwd;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epasswd\u003c/span\u003e;","displayNoNewLineWarning":false,"position":15,"left":878,"right":878},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":879,"text":" \tint\t\t\tresult;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":16,"left":879,"right":879},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":880,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":17,"left":880,"right":880}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3253,"linesChanged":4,"newTreeEntry":{"lineCount":3253,"path":"src/backend/libpq/auth.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/libpq/auth.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/backend/libpq/auth.c","pathDigest":"f7b3586e5625122376793d34b3ca05b199c0d34ef808b3fed72bf8d981a8b3af","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":135,"text":"@@ -136,7 +136,7 @@ encrypt_password(PasswordType target_type, const char *role,","html":"@@ -136,7 +136,7 @@ encrypt_password(PasswordType target_type, const char *role,","displayNoNewLineWarning":false,"position":0,"left":135,"right":135},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":136,"text":" \t\t\tcase PASSWORD_TYPE_MD5:","html":" \t\t\t\u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003ePASSWORD_TYPE_MD5\u003c/span\u003e:","displayNoNewLineWarning":false,"position":1,"left":136,"right":136},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":137,"text":" \t\t\t\tencrypted_password = palloc(MD5_PASSWD_LEN + 1);","html":" \t\t\t\t\u003cspan class=pl-s1\u003eencrypted_password\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epalloc\u003c/span\u003e(\u003cspan class=pl-c1\u003eMD5_PASSWD_LEN\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":137,"right":137},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":138,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":138,"right":138},{"stylingDirective":null,"type":"DELETION","blobLineNumber":139,"text":"-\t\t\t\tif (!pg_md5_encrypt(password, role, strlen(role),","html":"-\t\t\t\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (!\u003cspan class=\"pl-en\"\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003epassword\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003estrlen\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e),","displayNoNewLineWarning":false,"position":4,"left":139,"right":138},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":139,"text":"+\t\t\t\tif (!pg_md5_encrypt(password, (uint8 *) role, strlen(role),","html":"+\t\t\t\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (!\u003cspan class=\"pl-en\"\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003epassword\u003c/span\u003e, \u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003euint8\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003estrlen\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e),","displayNoNewLineWarning":false,"position":5,"left":139,"right":139},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":140,"text":" \t\t\t\t\t\t\t\t\tencrypted_password, \u0026errstr))","html":" \t\t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eencrypted_password\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e))","displayNoNewLineWarning":false,"position":6,"left":140,"right":140},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":141,"text":" \t\t\t\t\telog(ERROR, \"password encryption failed: %s\", errstr);","html":" \t\t\t\t\t\u003cspan class=pl-en\u003eelog\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;password encryption failed: %s\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":141,"right":141},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":142,"text":" \t\t\t\tbreak;","html":" \t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":8,"left":142,"right":142},{"stylingDirective":null,"type":"HUNK","blobLineNumber":200,"text":"@@ -201,7 +201,7 @@ encrypt_password(PasswordType target_type, const char *role,","html":"@@ -201,7 +201,7 @@ encrypt_password(PasswordType target_type, const char *role,","displayNoNewLineWarning":false,"position":9,"left":200,"right":200},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":201,"text":" int","html":" \u003cspan class=pl-smi\u003eint\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":201,"right":201},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":202,"text":" md5_crypt_verify(const char *role, const char *shadow_pass,","html":" \u003cspan class=pl-en\u003emd5_crypt_verify\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003erole\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eshadow_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":11,"left":202,"right":202},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":203,"text":" \t\t\t\t const char *client_pass,","html":" \t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eclient_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":12,"left":203,"right":203},{"stylingDirective":null,"type":"DELETION","blobLineNumber":204,"text":"-\t\t\t\t const char *md5_salt, int md5_salt_len,","html":"-\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emd5_salt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emd5_salt_len\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":204,"right":203},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":204,"text":"+\t\t\t\t const uint8 *md5_salt, int md5_salt_len,","html":"+\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emd5_salt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emd5_salt_len\u003c/span\u003e,","displayNoNewLineWarning":false,"position":14,"left":204,"right":204},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":205,"text":" \t\t\t\t const char **logdetail)","html":" \t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elogdetail\u003c/span\u003e)","displayNoNewLineWarning":false,"position":15,"left":205,"right":205},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":206,"text":" {","html":" {","displayNoNewLineWarning":false,"position":16,"left":206,"right":206},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":207,"text":" \tint\t\t\tretval;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eretval\u003c/span\u003e;","displayNoNewLineWarning":false,"position":17,"left":207,"right":207},{"stylingDirective":null,"type":"HUNK","blobLineNumber":283,"text":"@@ -284,7 +284,7 @@ plain_crypt_verify(const char *role, const char *shadow_pass,","html":"@@ -284,7 +284,7 @@ plain_crypt_verify(const char *role, const char *shadow_pass,","displayNoNewLineWarning":false,"position":18,"left":283,"right":283},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":284,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":19,"left":284,"right":284},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":285,"text":" \t\tcase PASSWORD_TYPE_MD5:","html":" \t\t\u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003ePASSWORD_TYPE_MD5\u003c/span\u003e:","displayNoNewLineWarning":false,"position":20,"left":285,"right":285},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":286,"text":" \t\t\tif (!pg_md5_encrypt(client_pass,","html":" \t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-en\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=pl-s1\u003eclient_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":21,"left":286,"right":286},{"stylingDirective":null,"type":"DELETION","blobLineNumber":287,"text":"-\t\t\t\t\t\t\t\trole,","html":"-\t\t\t\t\t\t\t\t\u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e,","displayNoNewLineWarning":false,"position":22,"left":287,"right":286},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":287,"text":"+\t\t\t\t\t\t\t\t(uint8 *) role,","html":"+\t\t\t\t\t\t\t\t\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003euint8\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e,","displayNoNewLineWarning":false,"position":23,"left":287,"right":287},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":288,"text":" \t\t\t\t\t\t\t\tstrlen(role),","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-en\u003estrlen\u003c/span\u003e(\u003cspan class=pl-s1\u003erole\u003c/span\u003e),","displayNoNewLineWarning":false,"position":24,"left":288,"right":288},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":289,"text":" \t\t\t\t\t\t\t\tcrypt_client_pass,","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003ecrypt_client_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":25,"left":289,"right":289},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":290,"text":" \t\t\t\t\t\t\t\t\u0026errstr))","html":" \t\t\t\t\t\t\t\t\u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e))","displayNoNewLineWarning":false,"position":26,"left":290,"right":290}],"diffNumber":4,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":321,"linesChanged":6,"newTreeEntry":{"lineCount":321,"path":"src/backend/libpq/crypt.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/libpq/crypt.c","mode":100644},"linesAdded":3,"linesDeleted":3,"path":"src/backend/libpq/crypt.c","pathDigest":"0522566868b444a47a97c2ddc2ebfe93042f4580fdb286bfe0f8eec6137d5e23","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":63,"text":"@@ -64,7 +64,7 @@ typedef struct","html":"@@ -64,7 +64,7 @@ typedef struct","displayNoNewLineWarning":false,"position":0,"left":63,"right":63},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":64,"text":" {","html":" {","displayNoNewLineWarning":false,"position":1,"left":64,"right":64},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":65,"text":" \tpg_atomic_uint32 pss_pid;","html":" \t\u003cspan class=pl-smi\u003epg_atomic_uint32\u003c/span\u003e \u003cspan class=pl-c1\u003epss_pid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":2,"left":65,"right":65},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":66,"text":" \tint\t\t\tpss_cancel_key_len; /* 0 means no cancellation is possible */","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-c1\u003epss_cancel_key_len\u003c/span\u003e; \u003cspan class=pl-c\u003e/* 0 means no cancellation is possible */\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":66,"right":66},{"stylingDirective":null,"type":"DELETION","blobLineNumber":67,"text":"-\tchar\t\tpss_cancel_key[MAX_CANCEL_KEY_LENGTH];","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t\t\u003cspan class=\"pl-c1\"\u003epss_cancel_key\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eMAX_CANCEL_KEY_LENGTH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":4,"left":67,"right":66},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":67,"text":"+\tuint8\t\tpss_cancel_key[MAX_CANCEL_KEY_LENGTH];","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t\t\u003cspan class=\"pl-c1\"\u003epss_cancel_key\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eMAX_CANCEL_KEY_LENGTH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":5,"left":67,"right":67},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":68,"text":" \tvolatile sig_atomic_t pss_signalFlags[NUM_PROCSIGNALS];","html":" \t\u003cspan class=pl-k\u003evolatile\u003c/span\u003e \u003cspan class=pl-smi\u003esig_atomic_t\u003c/span\u003e \u003cspan class=pl-c1\u003epss_signalFlags\u003c/span\u003e[\u003cspan class=pl-c1\u003eNUM_PROCSIGNALS\u003c/span\u003e];","displayNoNewLineWarning":false,"position":6,"left":68,"right":68},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":69,"text":" \tslock_t\t\tpss_mutex;\t\t/* protects the above fields */","html":" \t\u003cspan class=pl-smi\u003eslock_t\u003c/span\u003e\t\t\u003cspan class=pl-c1\u003epss_mutex\u003c/span\u003e;\t\t\u003cspan class=pl-c\u003e/* protects the above fields */\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":69,"right":69},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":70,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":70,"right":70},{"stylingDirective":null,"type":"HUNK","blobLineNumber":162,"text":"@@ -163,7 +163,7 @@ ProcSignalShmemInit(void)","html":"@@ -163,7 +163,7 @@ ProcSignalShmemInit(void)","displayNoNewLineWarning":false,"position":9,"left":162,"right":162},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":163,"text":" *\t\tRegister the current process in the ProcSignal array","html":" \u003cspan class=pl-c\u003e *\t\tRegister the current process in the ProcSignal array\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":163,"right":163},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":164,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":164,"right":164},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":165,"text":" void","html":" \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":165,"right":165},{"stylingDirective":null,"type":"DELETION","blobLineNumber":166,"text":"-ProcSignalInit(char *cancel_key, int cancel_key_len)","html":"-\u003cspan class=\"pl-en\"\u003eProcSignalInit\u003c/span\u003e(\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecancel_key\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecancel_key_len\u003c/span\u003e)","displayNoNewLineWarning":false,"position":13,"left":166,"right":165},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":166,"text":"+ProcSignalInit(const uint8 *cancel_key, int cancel_key_len)","html":"+\u003cspan class=\"pl-en\"\u003eProcSignalInit\u003c/span\u003e(\u003cspan class=\"pl-k x x-first\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecancel_key\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecancel_key_len\u003c/span\u003e)","displayNoNewLineWarning":false,"position":14,"left":166,"right":166},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":167,"text":" {","html":" {","displayNoNewLineWarning":false,"position":15,"left":167,"right":167},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":168,"text":" \tProcSignalSlot *slot;","html":" \t\u003cspan class=pl-smi\u003eProcSignalSlot\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eslot\u003c/span\u003e;","displayNoNewLineWarning":false,"position":16,"left":168,"right":168},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":169,"text":" \tuint64\t\tbarrier_generation;","html":" \t\u003cspan class=pl-smi\u003euint64\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003ebarrier_generation\u003c/span\u003e;","displayNoNewLineWarning":false,"position":17,"left":169,"right":169},{"stylingDirective":null,"type":"HUNK","blobLineNumber":728,"text":"@@ -729,7 +729,7 @@ procsignal_sigusr1_handler(SIGNAL_ARGS)","html":"@@ -729,7 +729,7 @@ procsignal_sigusr1_handler(SIGNAL_ARGS)","displayNoNewLineWarning":false,"position":18,"left":728,"right":728},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":729,"text":" * fields in the ProcSignal slots.","html":" \u003cspan class=pl-c\u003e * fields in the ProcSignal slots.\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":729,"right":729},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":730,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":730,"right":730},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":731,"text":" void","html":" \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":731,"right":731},{"stylingDirective":null,"type":"DELETION","blobLineNumber":732,"text":"-SendCancelRequest(int backendPID, char *cancel_key, int cancel_key_len)","html":"-\u003cspan class=\"pl-en\"\u003eSendCancelRequest\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ebackendPID\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecancel_key\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecancel_key_len\u003c/span\u003e)","displayNoNewLineWarning":false,"position":22,"left":732,"right":731},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":732,"text":"+SendCancelRequest(int backendPID, const uint8 *cancel_key, int cancel_key_len)","html":"+\u003cspan class=\"pl-en\"\u003eSendCancelRequest\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ebackendPID\u003c/span\u003e, \u003cspan class=\"pl-k x x-first\"\u003econst\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-smi x x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecancel_key\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecancel_key_len\u003c/span\u003e)","displayNoNewLineWarning":false,"position":23,"left":732,"right":732},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":733,"text":" {","html":" {","displayNoNewLineWarning":false,"position":24,"left":733,"right":733},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":734,"text":" \tAssert(backendPID != 0);","html":" \t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003ebackendPID\u003c/span\u003e \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e);","displayNoNewLineWarning":false,"position":25,"left":734,"right":734},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":735,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":26,"left":735,"right":735}],"diffNumber":5,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":798,"linesChanged":6,"newTreeEntry":{"lineCount":798,"path":"src/backend/storage/ipc/procsignal.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/storage/ipc/procsignal.c","mode":100644},"linesAdded":3,"linesDeleted":3,"path":"src/backend/storage/ipc/procsignal.c","pathDigest":"48deaee0315ae491682019652ceae040e43bf36328ad81fa3e0256f41c2a3948","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":49,"text":"@@ -50,7 +50,7 @@ pg_time_t\tMyStartTime;","html":"@@ -50,7 +50,7 @@ pg_time_t\tMyStartTime;","displayNoNewLineWarning":false,"position":0,"left":49,"right":49},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":50,"text":" TimestampTz MyStartTimestamp;","html":" \u003cspan class=pl-smi\u003eTimestampTz\u003c/span\u003e \u003cspan class=pl-s1\u003eMyStartTimestamp\u003c/span\u003e;","displayNoNewLineWarning":false,"position":1,"left":50,"right":50},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":51,"text":" struct ClientSocket *MyClientSocket;","html":" \u003cspan class=pl-k\u003estruct\u003c/span\u003e \u003cspan class=pl-smi\u003eClientSocket\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eMyClientSocket\u003c/span\u003e;","displayNoNewLineWarning":false,"position":2,"left":51,"right":51},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":52,"text":" struct Port *MyProcPort;","html":" \u003cspan class=pl-k\u003estruct\u003c/span\u003e \u003cspan class=pl-smi\u003ePort\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eMyProcPort\u003c/span\u003e;","displayNoNewLineWarning":false,"position":3,"left":52,"right":52},{"stylingDirective":null,"type":"DELETION","blobLineNumber":53,"text":"-char\t\tMyCancelKey[MAX_CANCEL_KEY_LENGTH];","html":"-\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003eMyCancelKey\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eMAX_CANCEL_KEY_LENGTH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":4,"left":53,"right":52},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":53,"text":"+uint8\t\tMyCancelKey[MAX_CANCEL_KEY_LENGTH];","html":"+\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t\t\u003cspan class=\"pl-s1\"\u003eMyCancelKey\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eMAX_CANCEL_KEY_LENGTH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":5,"left":53,"right":53},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":54,"text":" int\t\t\tMyCancelKeyLength = 0;","html":" \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eMyCancelKeyLength\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":6,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" int\t\t\tMyPMChildSlot;","html":" \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eMyPMChildSlot\u003c/span\u003e;","displayNoNewLineWarning":false,"position":7,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":56,"right":56}],"diffNumber":6,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":168,"linesChanged":2,"newTreeEntry":{"lineCount":168,"path":"src/backend/utils/init/globals.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/utils/init/globals.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/utils/init/globals.c","pathDigest":"c4f29fd17d74720f059a9480b0d39f5e2ddf3dba3f301504236f6fa752b386b0","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":40,"text":"@@ -41,15 +41,15 @@ static const int8 b64lookup[128] = {","html":"@@ -41,15 +41,15 @@ static const int8 b64lookup[128] = {","displayNoNewLineWarning":false,"position":0,"left":40,"right":40},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":41,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":41,"right":41},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":42,"text":" * pg_b64_encode","html":" \u003cspan class=pl-c\u003e * pg_b64_encode\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":42,"right":42},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":43,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":43,"right":43},{"stylingDirective":null,"type":"DELETION","blobLineNumber":44,"text":"- * Encode into base64 the given string. Returns the length of the encoded","html":"-\u003cspan class=\"pl-c\"\u003e * Encode \u003cspan class=\"x x-first x-last\"\u003einto base64 the given string\u003c/span\u003e. Returns the length of the encoded\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":44,"right":43},{"stylingDirective":null,"type":"DELETION","blobLineNumber":45,"text":"- * string, and -1 in the event of an error with the result buffer zeroed","html":"-\u003cspan class=\"pl-c\"\u003e * string, and -1 in the event of an error with the result buffer zeroed\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":45,"right":43},{"stylingDirective":null,"type":"DELETION","blobLineNumber":46,"text":"- * for safety.","html":"-\u003cspan class=\"pl-c\"\u003e * \u003cspan class=\"x x-first x-last\"\u003efor \u003c/span\u003esafety.\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":46,"right":43},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":44,"text":"+ * Encode the 'src' byte array into base64. Returns the length of the encoded","html":"+\u003cspan class=\"pl-c\"\u003e * Encode \u003cspan class=\"x x-first x-last\"\u003ethe 'src' byte array into base64\u003c/span\u003e. Returns the length of the encoded\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":46,"right":44},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":45,"text":"+ * string, and -1 in the event of an error with the result buffer zeroed for","html":"+\u003cspan class=\"pl-c\"\u003e * string, and -1 in the event of an error with the result buffer zeroed\u003cspan class=\"x x-first x-last 8000 \"\u003e for\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":46,"right":45},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":46,"text":"+ * safety.","html":"+\u003cspan class=\"pl-c\"\u003e * safety.\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":46,"right":46},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":47,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":47,"right":47},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":48,"text":" int","html":" \u003cspan class=pl-smi\u003eint\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":48,"right":48},{"stylingDirective":null,"type":"DELETION","blobLineNumber":49,"text":"-pg_b64_encode(const char *src, int len, char *dst, int dstlen)","html":"-\u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e)","displayNoNewLineWarning":false,"position":12,"left":49,"right":48},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":49,"text":"+pg_b64_encode(const uint8 *src, int len, char *dst, int dstlen)","html":"+\u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e)","displayNoNewLineWarning":false,"position":13,"left":49,"right":49},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":50,"text":" {","html":" {","displayNoNewLineWarning":false,"position":14,"left":50,"right":50},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":51,"text":" \tchar\t *p;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ep\u003c/span\u003e;","displayNoNewLineWarning":false,"position":15,"left":51,"right":51},{"stylingDirective":null,"type":"DELETION","blobLineNumber":52,"text":"-\tconst char *s,","html":"-\t\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003es\u003c/span\u003e,","displayNoNewLineWarning":false,"position":16,"left":52,"right":51},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":52,"text":"+\tconst uint8 *s,","html":"+\t\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003es\u003c/span\u003e,","displayNoNewLineWarning":false,"position":17,"left":52,"right":52},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":53,"text":" \t\t\t *end = src + len;","html":" \t\t\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eend\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003esrc\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-s1\u003elen\u003c/span\u003e;","displayNoNewLineWarning":false,"position":18,"left":53,"right":53},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":54,"text":" \tint\t\t\tpos = 2;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003epos\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e2\u003c/span\u003e;","displayNoNewLineWarning":false,"position":19,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" \tuint32\t\tbuf = 0;","html":" \t\u003cspan class=pl-smi\u003euint32\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003ebuf\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":20,"left":55,"right":55},{"stylingDirective":null,"type":"HUNK","blobLineNumber":58,"text":"@@ -59,7 +59,7 @@ pg_b64_encode(const char *src, int len, char *dst, int dstlen)","html":"@@ -59,7 +59,7 @@ pg_b64_encode(const char *src, int len, char *dst, int dstlen)","displayNoNewLineWarning":false,"position":21,"left":58,"right":58},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":59,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":22,"left":59,"right":59},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":60,"text":" \twhile (s \u003c end)","html":" \t\u003cspan class=pl-k\u003ewhile\u003c/span\u003e (\u003cspan class=pl-s1\u003es\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003eend\u003c/span\u003e)","displayNoNewLineWarning":false,"position":23,"left":60,"right":60},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":61,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":24,"left":61,"right":61},{"stylingDirective":null,"type":"DELETION","blobLineNumber":62,"text":"-\t\tbuf |= (unsigned char) *s \u003c\u003c (pos \u003c\u003c 3);","html":"-\t\t\u003cspan class=\"pl-s1\"\u003ebuf\u003c/span\u003e |= \u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003e\u003cspan class=\"x\"\u003eunsigned \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003es\u003c/span\u003e \u0026lt;\u0026lt; (\u003cspan class=\"pl-s1\"\u003epos\u003c/span\u003e \u0026lt;\u0026lt; \u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e);","displayNoNewLineWarning":false,"position":25,"left":62,"right":61},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":62,"text":"+\t\tbuf |= *s \u003c\u003c (pos \u003c\u003c 3);","html":"+\t\t\u003cspan class=\"pl-s1\"\u003ebuf\u003c/span\u003e |= \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003es\u003c/span\u003e \u0026lt;\u0026lt; (\u003cspan class=\"pl-s1\"\u003epos\u003c/span\u003e \u0026lt;\u0026lt; \u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e);","displayNoNewLineWarning":false,"position":26,"left":62,"right":62},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":63,"text":" \t\tpos--;","html":" \t\t\u003cspan class=pl-s1\u003epos\u003c/span\u003e\u003cspan class=pl-c1\u003e--\u003c/span\u003e;","displayNoNewLineWarning":false,"position":27,"left":63,"right":63},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":64,"text":" \t\ts++;","html":" \t\t\u003cspan class=pl-s1\u003es\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e;","displayNoNewLineWarning":false,"position":28,"left":64,"right":64},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":65,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":29,"left":65,"right":65},{"stylingDirective":null,"type":"HUNK","blobLineNumber":112,"text":"@@ -113,11 +113,11 @@ pg_b64_encode(const char *src, int len, char *dst, int dstlen)","html":"@@ -113,11 +113,11 @@ pg_b64_encode(const char *src, int len, char *dst, int dstlen)","displayNoNewLineWarning":false,"position":30,"left":112,"right":112},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":113,"text":" * buffer zeroed for safety.","html":" \u003cspan class=pl-c\u003e * buffer zeroed for safety.\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":113,"right":113},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":114,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":32,"left":114,"right":114},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":115,"text":" int","html":" \u003cspan class=pl-smi\u003eint\u003c/span\u003e","displayNoNewLineWarning":false,"position":33,"left":115,"right":115},{"stylingDirective":null,"type":"DELETION","blobLineNumber":116,"text":"-pg_b64_decode(const char *src, int len, char *dst, int dstlen)","html":"-\u003cspan class=\"pl-en\"\u003epg_b64_decode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e)","displayNoNewLineWarning":false,"position":34,"left":116,"right":115},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":116,"text":"+pg_b64_decode(const char *src, int len, uint8 *dst, int dstlen)","html":"+\u003cspan class=\"pl-en\"\u003epg_b64_decode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e)","displayNoNewLineWarning":false,"position":35,"left":116,"right":116},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":117,"text":" {","html":" {","displayNoNewLineWarning":false,"position":36,"left":117,"right":117},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":118,"text":" \tconst char *srcend = src + len,","html":" \t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esrcend\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003esrc\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-s1\u003elen\u003c/span\u003e,","displayNoNewLineWarning":false,"position":37,"left":118,"right":118},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":119,"text":" \t\t\t *s = src;","html":" \t\t\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003es\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003esrc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":38,"left":119,"right":119},{"stylingDirective":null,"type":"DELETION","blobLineNumber":120,"text":"-\tchar\t *p = dst;","html":"-\t\u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ep\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e;","displayNoNewLineWarning":false,"position":39,"left":120,"right":119},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":120,"text":"+\tuint8\t *p = dst;","html":"+\t\u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e\t \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ep\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e;","displayNoNewLineWarning":false,"position":40,"left":120,"right":120},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":121,"text":" \tchar\t\tc;","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003ec\u003c/span\u003e;","displayNoNewLineWarning":false,"position":41,"left":121,"right":121},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":122,"text":" \tint\t\t\tb = 0;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eb\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":42,"left":122,"right":122},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":123,"text":" \tuint32\t\tbuf = 0;","html":" \t\u003cspan class=pl-smi\u003euint32\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003ebuf\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":43,"left":123,"right":123}],"diffNumber":7,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":242,"linesChanged":16,"newTreeEntry":{"lineCount":242,"path":"src/common/base64.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/common/base64.c","mode":100644},"linesAdded":8,"linesDeleted":8,"path":"src/common/base64.c","pathDigest":"5c0101d20ff86871f6a4b3cb47d7a1c4fda0a472eee1e1b3f6fb92debb34cb3d","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":104,"text":"@@ -105,7 +105,7 @@ pg_md5_hash(const void *buff, size_t len, char *hexsum, const char **errstr)","html":"@@ -105,7 +105,7 @@ pg_md5_hash(const void *buff, size_t len, char *hexsum, const char **errstr)","displayNoNewLineWarning":false,"position":0,"left":104,"right":104},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":105,"text":" * (of size MD5_DIGEST_LENGTH) rather than being converted to ASCII hex.","html":" \u003cspan class=pl-c\u003e * (of size MD5_DIGEST_LENGTH) rather than being converted to ASCII hex.\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":105,"right":105},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":106,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":106,"right":106},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":107,"text":" bool","html":" \u003cspan class=pl-smi\u003ebool\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":107,"right":107},{"stylingDirective":null,"type":"DELETION","blobLineNumber":108,"text":"-pg_md5_binary(const void *buff, size_t len, void *outbuf, const char **errstr)","html":"-\u003cspan class=\"pl-en\"\u003epg_md5_binary\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ebuff\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003esize_t\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoutbuf\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eerrstr\u003c/span\u003e)","displayNoNewLineWarning":false,"position":4,"left":108,"right":107},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":108,"text":"+pg_md5_binary(const void *buff, size_t len, uint8 *outbuf, const char **errstr)","html":"+\u003cspan class=\"pl-en\"\u003epg_md5_binary\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ebuff\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003esize_t\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoutbuf\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eerrstr\u003c/span\u003e)","displayNoNewLineWarning":false,"position":5,"left":108,"right":108},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":109,"text":" {","html":" {","displayNoNewLineWarning":false,"position":6,"left":109,"right":109},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":110,"text":" \tpg_cryptohash_ctx *ctx;","html":" \t\u003cspan class=pl-smi\u003epg_cryptohash_ctx\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ectx\u003c/span\u003e;","displayNoNewLineWarning":false,"position":7,"left":110,"right":110},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":111,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":111,"right":111},{"stylingDirective":null,"type":"HUNK","blobLineNumber":141,"text":"@@ -142,7 +142,7 @@ pg_md5_binary(const void *buff, size_t len, void *outbuf, const char **errstr)","html":"@@ -142,7 +142,7 @@ pg_md5_binary(const void *buff, size_t len, void *outbuf, const char **errstr)","displayNoNewLineWarning":false,"position":9,"left":141,"right":141},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":142,"text":" * error context.","html":" \u003cspan class=pl-c\u003e * error context.\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":142,"right":142},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":143,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":143,"right":143},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":144,"text":" bool","html":" \u003cspan class=pl-smi\u003ebool\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":144,"right":144},{"stylingDirective":null,"type":"DELETION","blobLineNumber":145,"text":"-pg_md5_encrypt(const char *passwd, const char *salt, size_t salt_len,","html":"-\u003cspan class=\"pl-en\"\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003epasswd\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003esize_t\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esalt_len\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":145,"right":144},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":145,"text":"+pg_md5_encrypt(const char *passwd, const uint8 *salt, size_t salt_len,","html":"+\u003cspan class=\"pl-en\"\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003epasswd\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003esize_t\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esalt_len\u003c/span\u003e,","displayNoNewLineWarning":false,"position":14,"left":145,"right":145},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":146,"text":" \t\t\t char *buf, const char **errstr)","html":" \t\t\t \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ebuf\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e)","displayNoNewLineWarning":false,"position":15,"left":146,"right":146},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":147,"text":" {","html":" {","displayNoNewLineWarning":false,"position":16,"left":147,"right":147},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":148,"text":" \tsize_t\t\tpasswd_len = strlen(passwd);","html":" \t\u003cspan class=pl-smi\u003esize_t\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003epasswd_len\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003estrlen\u003c/span\u003e(\u003cspan class=pl-s1\u003epasswd\u003c/span\u003e);","displayNoNewLineWarning":false,"position":17,"left":148,"right":148}],"diffNumber":8,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":173,"linesChanged":4,"newTreeEntry":{"lineCount":173,"path":"src/common/md5_common.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/common/md5_common.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/common/md5_common.c","pathDigest":"c39235778c3d729f705ec2c35b9066dee0c6036054184fc105c921a4213c8073","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":36,"text":"@@ -37,7 +37,7 @@","html":"@@ -37,7 +37,7 @@","displayNoNewLineWarning":false,"position":0,"left":36,"right":36},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":37,"text":" int","html":" \u003cspan class=pl-smi\u003eint\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":37,"right":37},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":38,"text":" scram_SaltedPassword(const char *password,","html":" \u003cspan class=pl-en\u003escram_SaltedPassword\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epassword\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":38,"right":38},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":39,"text":" \t\t\t\t\t pg_cryptohash_type hash_type, int key_length,","html":" \t\t\t\t\t \u003cspan class=pl-smi\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=pl-s1\u003ehash_type\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e,","displayNoNewLineWarning":false,"position":3,"left":39,"right":39},{"stylingDirective":null,"type":"DELETION","blobLineNumber":40,"text":"-\t\t\t\t\t const char *salt, int saltlen, int iterations,","html":"-\t\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":40,"right":39},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":40,"text":"+\t\t\t\t\t const uint8 *salt, int saltlen, int iterations,","html":"+\t\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":40,"right":40},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":41,"text":" \t\t\t\t\t uint8 *result, const char **errstr)","html":" \t\t\t\t\t \u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eresult\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e)","displayNoNewLineWarning":false,"position":6,"left":41,"right":41},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":42,"text":" {","html":" {","displayNoNewLineWarning":false,"position":7,"left":42,"right":42},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":43,"text":" \tint\t\t\tpassword_len = strlen(password);","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003epassword_len\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003estrlen\u003c/span\u003e(\u003cspan class=pl-s1\u003epassword\u003c/span\u003e);","displayNoNewLineWarning":false,"position":8,"left":43,"right":43},{"stylingDirective":null,"type":"HUNK","blobLineNumber":61,"text":"@@ -62,7 +62,7 @@ scram_SaltedPassword(const char *password,","html":"@@ -62,7 +62,7 @@ scram_SaltedPassword(const char *password,","displayNoNewLineWarning":false,"position":9,"left":61,"right":61},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":62,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":10,"left":62,"right":62},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":63,"text":" \t/* First iteration */","html":" \t\u003cspan class=pl-c\u003e/* First iteration */\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":63,"right":63},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":64,"text":" \tif (pg_hmac_init(hmac_ctx, (uint8 *) password, password_len) \u003c 0 ||","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003epg_hmac_init\u003c/span\u003e(\u003cspan class=pl-s1\u003ehmac_ctx\u003c/span\u003e, (\u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003epassword\u003c/span\u003e, \u003cspan class=pl-s1\u003epassword_len\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":64,"right":64},{"stylingDirective":null,"type":"DELETION","blobLineNumber":65,"text":"-\t\tpg_hmac_update(hmac_ctx, (uint8 *) salt, saltlen) \u003c 0 ||","html":"-\t\t\u003cspan class=\"pl-en\"\u003epg_hmac_update\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ehmac_ctx\u003c/span\u003e, \u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003euint8\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e) \u003cspan class=\"pl-c1\"\u003e\u0026lt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":65,"right":64},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":65,"text":"+\t\tpg_hmac_update(hmac_ctx, salt, saltlen) \u003c 0 ||","html":"+\t\t\u003cspan class=\"pl-en\"\u003epg_hmac_update\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ehmac_ctx\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e) \u003cspan class=\"pl-c1\"\u003e\u0026lt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":65,"right":65},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":66,"text":" \t\tpg_hmac_update(hmac_ctx, (uint8 *) \u0026one, sizeof(uint32)) \u003c 0 ||","html":" \t\t\u003cspan class=pl-en\u003epg_hmac_update\u003c/span\u003e(\u003cspan class=pl-s1\u003ehmac_ctx\u003c/span\u003e, (\u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eone\u003c/span\u003e, \u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003euint32\u003c/span\u003e)) \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":15,"left":66,"right":66},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":67,"text":" \t\tpg_hmac_final(hmac_ctx, Ui_prev, key_length) \u003c 0)","html":" \t\t\u003cspan class=pl-en\u003epg_hmac_final\u003c/span\u003e(\u003cspan class=pl-s1\u003ehmac_ctx\u003c/span\u003e, \u003cspan class=pl-s1\u003eUi_prev\u003c/span\u003e, \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":16,"left":67,"right":67},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":68,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":17,"left":68,"right":68},{"stylingDirective":null,"type":"HUNK","blobLineNumber":206,"text":"@@ -207,7 +207,7 @@ scram_ServerKey(const uint8 *salted_password,","html":"@@ -207,7 +207,7 @@ scram_ServerKey(const uint8 *salted_password,","displayNoNewLineWarning":false,"position":18,"left":206,"right":206},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":207,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":207,"right":207},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":208,"text":" char *","html":" \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":208,"right":208},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":209,"text":" scram_build_secret(pg_cryptohash_type hash_type, int key_length,","html":" \u003cspan class=pl-en\u003escram_build_secret\u003c/span\u003e(\u003cspan class=pl-smi\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=pl-s1\u003ehash_type\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e,","displayNoNewLineWar 8000 ning":false,"position":21,"left":209,"right":209},{"stylingDirective":null,"type":"DELETION","blobLineNumber":210,"text":"-\t\t\t\t const char *salt, int saltlen, int iterations,","html":"-\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":22,"left":210,"right":209},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":210,"text":"+\t\t\t\t const uint8 *salt, int saltlen, int iterations,","html":"+\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":23,"left":210,"right":210},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":211,"text":" \t\t\t\t const char *password, const char **errstr)","html":" \t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epassword\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e)","displayNoNewLineWarning":false,"position":24,"left":211,"right":211},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":212,"text":" {","html":" {","displayNoNewLineWarning":false,"position":25,"left":212,"right":212},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":213,"text":" \tuint8\t\tsalted_password[SCRAM_MAX_KEY_LEN];","html":" \t\u003cspan class=pl-smi\u003euint8\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003esalted_password\u003c/span\u003e[\u003cspan class=pl-c1\u003eSCRAM_MAX_KEY_LEN\u003c/span\u003e];","displayNoNewLineWarning":false,"position":26,"left":213,"right":213},{"stylingDirective":null,"type":"HUNK","blobLineNumber":289,"text":"@@ -290,7 +290,7 @@ scram_build_secret(pg_cryptohash_type hash_type, int key_length,","html":"@@ -290,7 +290,7 @@ scram_build_secret(pg_cryptohash_type hash_type, int key_length,","displayNoNewLineWarning":false,"position":27,"left":289,"right":289},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":290,"text":" \t*(p++) = '$';","html":" \t\u003cspan class=pl-c1\u003e*\u003c/span\u003e(\u003cspan class=pl-s1\u003ep\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e) \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026#39;$\u0026#39;\u003c/span\u003e;","displayNoNewLineWarning":false,"position":28,"left":290,"right":290},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":291,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":29,"left":291,"right":291},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":292,"text":" \t/* stored key */","html":" \t\u003cspan class=pl-c\u003e/* stored key */\u003c/span\u003e","displayNoNewLineWarning":false,"position":30,"left":292,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":293,"text":"-\tencoded_result = pg_b64_encode((char *) stored_key, key_length, p,","html":"-\t\u003cspan class=\"pl-s1\"\u003eencoded_result\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003estored_key\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ekey_length\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ep\u003c/span\u003e,","displayNoNewLineWarning":false,"position":31,"left":293,"right":292},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":293,"text":"+\tencoded_result = pg_b64_encode(stored_key, key_length, p,","html":"+\t\u003cspan class=\"pl-s1\"\u003eencoded_result\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003estored_key\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ekey_length\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ep\u003c/span\u003e,","displayNoNewLineWarning":false,"position":32,"left":293,"right":293},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":294,"text":" \t\t\t\t\t\t\t\t encoded_stored_len);","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-s1\u003eencoded_stored_len\u003c/span\u003e);","displayNoNewLineWarning":false,"position":33,"left":294,"right":294},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":295,"text":" \tif (encoded_result \u003c 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eencoded_result\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":34,"left":295,"right":295},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":296,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":35,"left":296,"right":296},{"stylingDirective":null,"type":"HUNK","blobLineNumber":306,"text":"@@ -307,7 +307,7 @@ scram_build_secret(pg_cryptohash_type hash_type, int key_length,","html":"@@ -307,7 +307,7 @@ scram_build_secret(pg_cryptohash_type hash_type, int key_length,","displayNoNewLineWarning":false,"position":36,"left":306,"right":306},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":307,"text":" \t*(p++) = ':';","html":" \t\u003cspan class=pl-c1\u003e*\u003c/span\u003e(\u003cspan class=pl-s1\u003ep\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e) \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026#39;:\u0026#39;\u003c/span\u003e;","displayNoNewLineWarning":false,"position":37,"left":307,"right":307},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":308,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":38,"left":308,"right":308},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":309,"text":" \t/* server key */","html":" \t\u003cspan class=pl-c\u003e/* server key */\u003c/span\u003e","displayNoNewLineWarning":false,"position":39,"left":309,"right":309},{"stylingDirective":null,"type":"DELETION","blobLineNumber":310,"text":"-\tencoded_result = pg_b64_encode((char *) server_key, key_length, p,","html":"-\t\u003cspan class=\"pl-s1\"\u003eencoded_result\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e*\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eserver_key\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ekey_length\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ep\u003c/span\u003e,","displayNoNewLineWarning":false,"position":40,"left":310,"right":309},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":310,"text":"+\tencoded_result = pg_b64_encode(server_key, key_length, p,","html":"+\t\u003cspan class=\"pl-s1\"\u003eencoded_result\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eserver_key\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ekey_length\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ep\u003c/span\u003e,","displayNoNewLineWarning":false,"position":41,"left":310,"right":310},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":311,"text":" \t\t\t\t\t\t\t\t encoded_server_len);","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-s1\u003eencoded_server_len\u003c/span\u003e);","displayNoNewLineWarning":false,"position":42,"left":311,"right":311},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":312,"text":" \tif (encoded_result \u003c 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eencoded_result\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":43,"left":312,"right":312},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":313,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":44,"left":313,"right":313}],"diffNumber":9,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":329,"linesChanged":10,"newTreeEntry":{"lineCount":329,"path":"src/common/scram-common.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/common/scram-common.c","mode":100644},"linesAdded":5,"linesDeleted":5,"path":"src/common/scram-common.c","pathDigest":"080c991a9834398f104205d82db1c1c307524a74e2fb32841f0a6966ff6b2fd7","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":10,"text":"@@ -11,8 +11,8 @@","html":"@@ -11,8 +11,8 @@","displayNoNewLineWarning":false,"position":0,"left":10,"right":10},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":11,"text":" #define BASE64_H","html":" \u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eBASE64_H\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":11,"right":11},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":12,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":12,"right":12},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":13,"text":" /* base 64 */","html":" \u003cspan class=pl-c\u003e/* base 64 */\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":13,"right":13},{"stylingDirective":null,"type":"DELETION","blobLineNumber":14,"text":"-pg_nodiscard extern int pg_b64_encode(const char *src, int len, char *dst, int dstlen);","html":"-\u003cspan class=\"pl-smi\"\u003epg_nodiscard\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":14,"right":13},{"stylingDirective":null,"type":"DELETION","blobLineNumber":15,"text":"-pg_nodiscard extern int pg_b64_decode(const char *src, int len, char *dst, int dstlen);","html":"-\u003cspan class=\"pl-smi\"\u003epg_nodiscard\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_decode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":15,"right":13},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":14,"text":"+pg_nodiscard extern int pg_b64_encode(const uint8 *src, int len, char *dst, int dstlen);","html":"+\u003cspan class=\"pl-smi\"\u003epg_nodiscard\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_encode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":15,"right":14},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":15,"text":"+pg_nodiscard extern int pg_b64_decode(const char *src, int len, uint8 *dst, int dstlen);","html":"+\u003cspan class=\"pl-smi\"\u003epg_nodiscard\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_b64_decode\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esrc\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edst\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edstlen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":15,"right":15},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":16,"text":" extern int\tpg_b64_enc_len(int srclen);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\u003cspan class=pl-en\u003epg_b64_enc_len\u003c/span\u003e(\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esrclen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":8,"left":16,"right":16},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":17,"text":" extern int\tpg_b64_dec_len(int srclen);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\u003cspan class=pl-en\u003epg_b64_dec_len\u003c/span\u003e(\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esrclen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":9,"left":17,"right":17},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":18,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":10,"left":18,"right":18}],"diffNumber":10,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":19,"linesChanged":4,"newTreeEntry":{"lineCount":19,"path":"src/include/common/base64.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/common/base64.h","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/include/common/base64.h","pathDigest":"bb378b6d82d4a0b62d99c986e8cf01ba0f726b57ee061e23ed1c7642d6635411","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":27,"text":"@@ -28,9 +28,9 @@","html":"@@ -28,9 +28,9 @@","displayNoNewLineWarning":false,"position":0,"left":27,"right":27},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":28,"text":" /* Utilities common to all the MD5 implementations, as of md5_common.c */","html":" \u003cspan class=pl-c\u003e/* Utilities common to all the MD5 implementations, as of md5_common.c */\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":28,"right":28},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":29,"text":" extern bool pg_md5_hash(const void *buff, size_t len, char *hexsum,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-en\u003epg_md5_hash\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ebuff\u003c/span\u003e, \u003cspan class=pl-smi\u003esize_t\u003c/span\u003e \u003cspan class=pl-s1\u003elen\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ehexsum\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":29,"right":29},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":30,"text":" \t\t\t\t\t\tconst char **errstr);","html":" \t\t\t\t\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":30,"right":30},{"stylingDirective":null,"type":"DELETION","blobLineNumber":31,"text":"-extern bool pg_md5_binary(const void *buff, size_t len, void *outbuf,","html":"-\u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_md5_binary\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ebuff\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003esize_t\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoutbuf\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":31,"right":30},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":31,"text":"+extern bool pg_md5_binary(const void *buff, size_t len, uint8 *outbuf,","html":"+\u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_md5_binary\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ebuff\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003esize_t\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elen\u003c/span\u003e, \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoutbuf\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":31,"right":31},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":32,"text":" \t\t\t\t\t\t const char **errstr);","html":" \t\t\t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":32,"right":32},{"stylingDirective":null,"type":"DELETION","blobLineNumber":33,"text":"-extern bool pg_md5_encrypt(const char *passwd, const char *salt,","html":"-\u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003epasswd\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e,","displayNoNewLineWarning":false,"position":7,"left":33,"right":32},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":33,"text":"+extern bool pg_md5_encrypt(const char *passwd, const uint8 *salt,","html":"+\u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epg_md5_encrypt\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003epasswd\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e,","displayNoNewLineWarning":false,"position":8,"left":33,"right":33},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":34,"text":" \t\t\t\t\t\t size_t salt_len, char *buf,","html":" \t\t\t\t\t\t \u003cspan class=pl-smi\u003esize_t\u003c/span\u003e \u003cspan class=pl-s1\u003esalt_len\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ebuf\u003c/span\u003e,","displayNoNewLineWarning":false,"position":9,"left":34,"right":34},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":35,"text":" \t\t\t\t\t\t const char **errstr);","html":" \t\t\t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":35,"right":35},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":36,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":11,"left":36,"right":36}],"diffNumber":11,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":37,"linesChanged":4,"newTreeEntry":{"lineCount":37,"path":"src/include/common/md5.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/common/md5.h","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/include/common/md5.h","pathDigest":"e3d03b848b93a2bd646391bb12ff1c742ccfd9543f22b95e5610b24dfcf7cf87","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":50,"text":"@@ -51,7 +51,7 @@","html":"@@ -51,7 +51,7 @@","displayNoNewLineWarning":false,"position":0,"left":50,"right":50},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":51,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":1,"left":51,"right":51},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":52,"text":" extern int\tscram_SaltedPassword(const char *password,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\u003cspan class=pl-en\u003escram_SaltedPassword\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epassword\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":52,"right":52},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":53,"text":" \t\t\t\t\t\t\t\t pg_cryptohash_type hash_type, int key_length,","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-smi\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=pl-s1\u003ehash_type\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e,","displayNoNewLineWarning":false,"position":3,"left":53,"right":53},{"stylingDirective":null,"type":"DELETION","blobLineNumber":54,"text":"-\t\t\t\t\t\t\t\t const char *salt, int saltlen, int iterations,","html":"-\t\t\t\t\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":54,"right":53},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":54,"text":"+\t\t\t\t\t\t\t\t const uint8 *salt, int saltlen, int iterations,","html":"+\t\t\t\t\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" \t\t\t\t\t\t\t\t uint8 *result, const char **errstr);","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eresult\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" extern int\tscram_H(const uint8 *input, pg_cryptohash_type hash_type,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\u003cspan class=pl-en\u003escram_H\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003einput\u003c/span\u003e, \u003cspan class=pl-smi\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=pl-s1\u003ehash_type\u003c/span\u003e,","displayNoNewLineWarning":false,"position":7,"left":56,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" \t\t\t\t\tint key_length, uint8 *result,","html":" \t\t\t\t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e, \u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eresult\u003c/span\u003e,","displayNoNewLineWarning":false,"position":8,"left":57,"right":57},{"stylingDirective":null,"type":"HUNK","blobLineNumber":63,"text":"@@ -64,7 +64,7 @@ extern int\tscram_ServerKey(const uint8 *salted_password,","html":"@@ -64,7 +64,7 @@ extern int\tscram_ServerKey(const uint8 *salted_password,","displayNoNewLineWarning":false,"position":9,"left":63,"right":63},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":64,"text":" \t\t\t\t\t\t\tuint8 *result, const char **errstr);","html":" \t\t\t\t\t\t\t\u003cspan class=pl-smi\u003euint8\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eresult\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":64,"right":64},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":65,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":11,"left":65,"right":65},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":66,"text":" extern char *scram_build_secret(pg_cryptohash_type hash_type, int key_length,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-en\u003escram_build_secret\u003c/span\u003e(\u003cspan class=pl-smi\u003epg_cryptohash_type\u003c/span\u003e \u003cspan class=pl-s1\u003ehash_type\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003ekey_length\u003c/span\u003e,","displayNoNewLineWarning":false,"position":12,"left":66,"right":66},{"stylingDirective":null,"type":"DELETION","blobLineNumber":67,"text":"-\t\t\t\t\t\t\t\tconst char *salt, int saltlen, int iterations,","html":"-\t\t\t\t\t\t\t\t\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":67,"right":66},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":67,"text":"+\t\t\t\t\t\t\t\tconst uint8 *salt, int saltlen, int iterations,","html":"+\t\t\t\t\t\t\t\t\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esalt\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003esaltlen\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eiterations\u003c/span\u003e,","displayNoNewLineWarning":false,"position":14,"left":67,"right":67},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":68,"text":" \t\t\t\t\t\t\t\tconst char *password, const char **errstr);","html" 8000 :" \t\t\t\t\t\t\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epassword\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eerrstr\u003c/span\u003e);","displayNoNewLineWarning":false,"position":15,"left":68,"right":68},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":69,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":16,"left":69,"right":69},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":70,"text":" #endif\t\t\t\t\t\t\t/* SCRAM_COMMON_H */","html":" \u003cspan class=pl-k\u003e#endif\u003c/span\u003e\t\t\t\t\t\t\t\u003cspan class=pl-c\u003e/* SCRAM_COMMON_H */\u003c/span\u003e","displayNoNewLineWarning":false,"position":17,"left":70,"right":70}],"diffNumber":12,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":70,"linesChanged":4,"newTreeEntry":{"lineCount":70,"path":"src/include/common/scram-common.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/common/scram-common.h","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/include/common/scram-common.h","pathDigest":"1c43eead16d71e4c980aa7b6c8f2d3016dafbd1f0d2babe843b5f96b4a4087b9","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":36,"text":"@@ -37,7 +37,7 @@ extern PGDLLIMPORT bool pg_krb_caseins_users;","html":"@@ -37,7 +37,7 @@ extern PGDLLIMPORT bool pg_krb_caseins_users;","displayNoNewLineWarning":false,"position":0,"left":36,"right":36},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":37,"text":" extern PGDLLIMPORT bool pg_gss_accept_delegation;","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003ePGDLLIMPORT\u003c/span\u003e \u003cspan class=pl-s1\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003epg_gss_accept_delegation\u003c/span\u003e;","displayNoNewLineWarning":false,"position":1,"left":37,"right":37},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":38,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":38,"right":38},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":39,"text":" extern void ClientAuthentication(Port *port);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eClientAuthentication\u003c/span\u003e(\u003cspan class=pl-smi\u003ePort\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eport\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":39,"right":39},{"stylingDirective":null,"type":"DELETION","blobLineNumber":40,"text":"-extern void sendAuthRequest(Port *port, AuthRequest areq, const char *extradata,","html":"-\u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-en\"\u003esendAuthRequest\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003ePort\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eport\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eAuthRequest\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eareq\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eextradata\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":40,"right":39},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":40,"text":"+extern void sendAuthRequest(Port *port, AuthRequest areq, const void *extradata,","html":"+\u003cspan class=\"pl-k\"\u003eextern\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-en\"\u003esendAuthRequest\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003ePort\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eport\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eAuthRequest\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eareq\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eextradata\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":40,"right":40},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":41,"text":" \t\t\t\t\t\t\tint extralen);","html":" \t\t\t\t\t\t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003eextralen\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":41,"right":41},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":42,"text":" extern void set_authn_id(Port *port, const char *id);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eset_authn_id\u003c/span\u003e(\u003cspan class=pl-smi\u003ePort\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eport\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":42,"right":42},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":43,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":43,"right":43}],"diffNumber":13,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":54,"linesChanged":2,"newTreeEntry":{"lineCount":54,"path":"src/include/libpq/auth.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/libpq/auth.h","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/include/libpq/auth.h","pathDigest":"842015a737715e14de84420396b46ddd57b0776193226fa99eab8648248ab460","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":50,"text":"@@ -51,7 +51,7 @@ extern char *encrypt_password(PasswordType target_type, const char *role,","html":"@@ -51,7 +51,7 @@ extern char *encrypt_password(PasswordType target_type, const char *role,","displayNoNewLineWarning":false,"position":0,"left":50,"right":50},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":51,"text":" extern char *get_role_password(const char *role, const char **logdetail);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-en\u003eget_role_password\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003erole\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elogdetail\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":51,"right":51},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":52,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":52,"right":52},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":53,"text":" extern int\tmd5_crypt_verify(const char *role, const char *shadow_pass,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\u003cspan class=pl-en\u003emd5_crypt_verify\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003erole\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eshadow_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":3,"left":53,"right":53},{"stylingDirective":null,"type":"DELETION","blobLineNumber":54,"text":"-\t\t\t\t\t\t\t const char *client_pass, const char *md5_salt,","html":"-\t\t\t\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eclient_pass\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emd5_salt\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":54,"right":53},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":54,"text":"+\t\t\t\t\t\t\t const char *client_pass, const uint8 *md5_salt,","html":"+\t\t\t\t\t\t\t \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003echar\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eclient_pass\u003c/span\u003e, \u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-smi x x-first x-last\"\u003euint8\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emd5_salt\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" \t\t\t\t\t\t\t int md5_salt_len, const char **logdetail);","html":" \t\t\t\t\t\t\t \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003emd5_salt_len\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elogdetail\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" extern int\tplain_crypt_verify(const char *role, const char *shadow_pass,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\u003cspan class=pl-en\u003eplain_crypt_verify\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003erole\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eshadow_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":7,"left":56,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" \t\t\t\t\t\t\t const char *client_pass,","html":" \t\t\t\t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eclient_pass\u003c/span\u003e,","displayNoNewLineWarning":false,"position":8,"left":57,"right":57}],"diffNumber":14,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":60,"linesChanged":2,"newTreeEntry":{"lineCount":60,"path":"src/include/libpq/crypt.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/libpq/crypt.h","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/include/libpq/crypt.h","pathDigest":"8f37013fdb2044f597c396ca224f0316083c211bfb000a1faa0a1c2c69a626aa","status":"MODIFIED","truncatedReason":null,"oldOid":"965213d9c56a671086525a65f5427653b4a66350","newOid":"b28c59a6cd089902e66a91e0d0974da34d1c922b","copilotChatReference":null,"deletedSha":"965213d9c56a671086525a65f5427653b4a66350","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"path":"src/include/libpq/pqcomm.h","pathDigest":"346eb5f172cf5d9d7ba00770786b6680585f617552c389d2b34f19d84d0b63b0","status":"MODIFIED"},{"path":"src/include/miscadmin.h","pathDigest":"afc0ebd67534b71b5b94b29a1387aa6eedffe342a5539f52d686428be323e802","status":"MODIFIED"},{"path":"src/include/storage/procsignal.h","pathDigest":"652bca7c31ee39432af6390fb7f87c948484043320f430a3e205fe71f8ca9262","status":"MODIFIED"},{"path":"src/interfaces/libpq/fe-auth-scram.c","pathDigest":"93284672bb47444bdd761f91a15178c04558ccf7053ddfdf8cd2957b937ba830","status":"MODIFIED"},{"path":"src/interfaces/libpq/fe-auth.c","pathDigest":"673cc67fd251cd264c5e8f6a392782141ed126d72860c434a08ed70b1674cd0d","status":"MODIFIED"},{"path":"src/interfaces/libpq/fe-cancel.c","pathDigest":"831fc6e387f720dc27d43ca34328c25a0c0df76c64152f34c0f4174dfbfed534","status":"MODIFIED"},{"path":"src/interfaces/libpq/fe-misc.c","pathDigest":"f841acf02862af937cc11c55df1c8ae3e8db81dd16ea0c0e0c7ead5f404e796c","status":"MODIFIED"},{"path":"src/interfaces/libpq/fe-protocol3.c","pathDigest":"21463ad3375a74cb82a8027cf3c78b37efe314e6af9d3aec24c10d76a4d7ef3c","status":"MODIFIED"},{"path":"src/interfaces/libpq/libpq-int.h","pathDigest":"79b513b2c480c8234a836295a323fb1f9319157a93b97933c49f79b663998a71","status":"MODIFIED"}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/b28c59a6cd089902e66a91e0d0974da34d1c922b","fileTreeExpanded":true,"headerInfo":{"additions":80,"deletions":80,"filesChanged":24,"filesChangedString":"24"},"moreDiffsToLoad":true,"asyncDiffLoadInfo":{"startIndex":15,"truncated":false,"byteCount":15033,"lineShownCount":397},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"F2gsgVTyx3UBk1ABjNchtDo6V8tLRtoNg175tAaImWxfwr2EDqp41NGtlO3Q9FREXUdqWCelzHucBuY-1AawlQ"},"/users/diffview?diff=unified":{"post":"mIadx3np0T5qt9B5rYALzkoL-HYFqEIdzmBLU2D_XCHQLAzCI7Fun7qJFJXxo34-LXbF5WlLVGvROFTZsnF12A"},"/notifications/thread":{"post":"3mJndrGzG6F3Za39UUYw6PbItSM7Km4RlgV3kSTnMX9dyKaF46TE9eE0CmZB1PVJA0Thlx6W3-8S92chLoHdug"}}},"title":"Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays · postgres/postgres@b28c59a","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-6dcb06aa9fad.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":false}}}

Commit b28c59a

Browse files
committed
Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays
A 'void *' argument suggests that the caller might pass an arbitrary struct, which is appropriate for functions like libc's read/write, or pq_sendbytes(). 'uint8 *' is more appropriate for byte arrays that have no structure, like the cancellation keys or SCRAM tokens. Some places used 'char *', but 'uint8 *' is better because 'char *' is commonly used for null-terminated strings. Change code around SCRAM, MD5 authentication, and cancellation key handling to follow these conventions. Discussion: https://www.postgresql.org/message-id/61be9e31-7b7d-49d5-bc11-721800d89d64@eisentraut.org
1 parent 965213d commit b28c59a

File tree

24 files changed

+80
-80
lines changed

24 files changed

+80
-80
lines changed

contrib/dblink/dblink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,7 +3218,7 @@ appendSCRAMKeysInfo(StringInfo buf)
32183218
len = pg_b64_enc_len(sizeof(MyProcPort->scram_ClientKey));
32193219
/* don't forget the zero-terminator */
32203220
client_key = palloc0(len + 1);
3221-
encoded_len = pg_b64_encode((const char *) MyProcPort->scram_ClientKey,
3221+
encoded_len = pg_b64_encode(MyProcPort->scram_ClientKey,
32223222
sizeof(MyProcPort->scram_ClientKey),
32233223
client_key, len);
32243224
if (encoded_len < 0)
@@ -3227,7 +3227,7 @@ appendSCRAMKeysInfo(StringInfo buf)
32273227
len = pg_b64_enc_len(sizeof(MyProcPort->scram_ServerKey));
32283228
/* don't forget the zero-terminator */
32293229
server_key = palloc0(len + 1);
3230-
encoded_len = pg_b64_encode((const char *) MyProcPort->scram_ServerKey,
3230+
encoded_len = pg_b64_encode(MyProcPort->scram_ServerKey,
32313231
sizeof(MyProcPort->scram_ServerKey),
32323232
server_key, len);
32333233
if (encoded_len < 0)

contrib/postgres_fdw/connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
577577
len = pg_b64_enc_len(sizeof(MyProcPort->scram_ClientKey));
578578
/* don't forget the zero-terminator */
579579
values[n] = palloc0(len + 1);
580-
encoded_len = pg_b64_encode((const char *) MyProcPort->scram_ClientKey,
580+
encoded_len = pg_b64_encode(MyProcPort->scram_ClientKey,
581581
sizeof(MyProcPort->scram_ClientKey),
582582
(char *) values[n], len);
583583
if (encoded_len < 0)
@@ -588,7 +588,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
588588
len = pg_b64_enc_len(sizeof(MyProcPort->scram_ServerKey));
589589
/* don't forget the zero-terminator */
590590
values[n] = palloc0(len + 1);
591-
encoded_len = pg_b64_encode((const char *) MyProcPort->scram_ServerKey,
591+
encoded_len = pg_b64_encode(MyProcPort->scram_ServerKey,
592592
sizeof(MyProcPort->scram_ServerKey),
593593
(char *) values[n], len);
594594
if (encoded_len < 0)

src/backend/libpq/auth-scram.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ typedef struct
158158
/* Fields from the last message from client */
159159
char *client_final_message_without_proof;
160160
char *client_final_nonce;
161-
char ClientProof[SCRAM_MAX_KEY_LEN];
161+
uint8 ClientProof[SCRAM_MAX_KEY_LEN];
162162

163163
/* Fields generated in the server */
164164
char *server_first_message;
@@ -186,9 +186,9 @@ static void mock_scram_secret(const char *username, pg_cryptohash_type *hash_typ
186186
static bool is_scram_printable(char *p);
187187
static char *sanitize_char(char c);
188188
static char *sanitize_str(const char *s);
189-
static char *scram_mock_salt(const char *username,
190-
pg_cryptohash_type hash_type,
191-
int key_length);
189+
static uint8 *scram_mock_salt(const char *username,
190+
pg_cryptohash_type hash_type,
191+
int key_length);
192192

193193
/*
194194
* The number of iterations to use when generating new secrets.
@@ -484,7 +484,7 @@ pg_be_scram_build_secret(const char *password)
484484
{
485485
char *prep_password;
486486
pg_saslprep_rc rc;
487-
char saltbuf[SCRAM_DEFAULT_SALT_LEN];
487+
uint8 saltbuf[SCRAM_DEFAULT_SALT_LEN];
488488
char *result;
489489
const char *errstr = NULL;
490490

@@ -524,7 +524,7 @@ scram_verify_plain_password(const char *username, const char *password,
524524
const char *secret)
525525
{
526526
char *encoded_salt;
527-
char *salt;
527+
uint8 *salt;
528528
int saltlen;
529529
int iterations;
530530
int key_length = 0;
@@ -609,9 +609,9 @@ parse_scram_secret(const char *secret, int *iterations,
609609
char *storedkey_str;
610610
char *serverkey_str;
611611
int decoded_len;
612-
char *decoded_salt_buf;
613-
char *decoded_stored_buf;
614-
char *decoded_server_buf;
612+
uint8 *decoded_salt_buf;
613+
uint8 *decoded_stored_buf;
614+
uint8 *decoded_server_buf;
615615

616616
/*
617617
* The secret is of form:
@@ -698,7 +698,7 @@ mock_scram_secret(const char *username, pg_cryptohash_type *hash_type,
698698
int *iterations, int *key_length, char **salt,
699699
uint8 *stored_key, uint8 *server_key)
700700
{
701-
char *raw_salt;
701+
uint8 *raw_salt;
702702
char *encoded_salt;
703703
int encoded_len;
704704

@@ -1231,7 +1231,7 @@ build_server_first_message(scram_state *state)
12311231
* For convenience, however, we don't use the whole range available,
12321232
* rather, we generate some random bytes, and base64 encode them.
12331233
*/
1234-
char raw_nonce[SCRAM_RAW_NONCE_LEN];
1234+
uint8 raw_nonce[SCRAM_RAW_NONCE_LEN];
12351235
int encoded_len;
12361236

12371237
if (!pg_strong_random(raw_nonce, SCRAM_RAW_NONCE_LEN))
@@ -1271,7 +1271,7 @@ read_client_final_message(scram_state *state, const char *input)
12711271
char *begin,
12721272
*proof;
12731273
char *p;
1274-
char *client_proof;
1274+
uint8 *client_proof;
12751275
int client_proof_len;
12761276

12771277
begin = p = pstrdup(input);
@@ -1340,7 +1340,7 @@ read_client_final_message(scram_state *state, const char *input)
13401340
b64_message_len = pg_b64_enc_len(cbind_input_len);
13411341
/* don't forget the zero-terminator */
13421342
b64_message = palloc(b64_message_len + 1);
1343-
b64_message_len = pg_b64_encode(cbind_input, cbind_input_len,
1343+
b64_message_len = pg_b64_encode((uint8 *) cbind_input, cbind_input_len,
13441344
b64_message, b64_message_len);
13451345
if (b64_message_len < 0)
13461346
elog(ERROR, "could not encode channel binding data");
@@ -1440,7 +1440,7 @@ build_server_final_message(scram_state *state)
14401440
siglen = pg_b64_enc_len(state->key_length);
14411441
/* don't forget the zero-terminator */
14421442
server_signature_base64 = palloc(siglen + 1);
1443-
siglen = pg_b64_encode((const char *) ServerSignature,
1443+
siglen = pg_b64_encode(ServerSignature,
14441444
state->key_length, server_signature_base64,
14451445
siglen);
14461446
if (siglen < 0)
@@ -1467,7 +1467,7 @@ build_server_final_message(scram_state *state)
14671467
* hash based on the username and a cluster-level secret key. Returns a
14681468
* pointer to a static buffer of size SCRAM_DEFAULT_SALT_LEN, or NULL.
14691469
*/
1470-
static char *
1470+
static uint8 *
14711471
scram_mock_salt(const char *username, pg_cryptohash_type hash_type,
14721472
int key_length)
14731473
{
@@ -1501,5 +1501,5 @@ scram_mock_salt(const char *username, pg_cryptohash_type hash_type,
15011501
}
15021502
pg_cryptohash_free(ctx);
15031503

1504-
return (char *) sha_digest;
1504+
return sha_digest;
15051505
}

src/backend/libpq/auth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ ClientAuthentication(Port *port)
666666
* Send an authentication request packet to the frontend.
667667
*/
668668
void
669-
sendAuthRequest(Port *port, AuthRequest areq, const char *extradata, int extralen)
669+
sendAuthRequest(Port *port, AuthRequest areq, const void *extradata, int extralen)
670670
{
671671
StringInfoData buf;
672672

@@ -874,7 +874,7 @@ CheckPWChallengeAuth(Port *port, const char **logdetail)
874874
static int
875875
CheckMD5Auth(Port *port, char *shadow_pass, const char **logdetail)
876876
{
877-
char md5Salt[4]; /* Password salt */
877+
uint8 md5Salt[4]; /* Password salt */
878878
char *passwd;
879879
int result;
880880

src/backend/libpq/crypt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ encrypt_password(PasswordType target_type, const char *role,
136136
case PASSWORD_TYPE_MD5:
137137
encrypted_password = palloc(MD5_PASSWD_LEN + 1);
138138

139-
if (!pg_md5_encrypt(password, role, strlen(role),
139+
if (!pg_md5_encrypt(password, (uint8 *) role, strlen(role),
140140
encrypted_password, &errstr))
141141
elog(ERROR, "password encryption failed: %s", errstr);
142142
break;
@@ -201,7 +201,7 @@ encrypt_password(PasswordType target_type, const char *role,
201201
int
202202
md5_crypt_verify(const char *role, const char *shadow_pass,
203203
const char *client_pass,
204-
const char *md5_salt, int md5_salt_len,
204+
const uint8 *md5_salt, int md5_salt_len,
205205
const char **logdetail)
206206
{
207207
int retval;
@@ -284,7 +284,7 @@ plain_crypt_verify(const char *role, const char *shadow_pass,
284284

285285
case PASSWORD_TYPE_MD5:
286286
if (!pg_md5_encrypt(client_pass,
287-
role,
287+
(uint8 *) role,
288288
strlen(role),
289289
crypt_client_pass,
290290
&errstr))

src/backend/storage/ipc/procsignal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct
6464
{
6565
pg_atomic_uint32 pss_pid;
6666
int pss_cancel_key_len; /* 0 means no cancellation is possible */
67-
char pss_cancel_key[MAX_CANCEL_KEY_LENGTH];
67+
uint8 pss_cancel_key[MAX_CANCEL_KEY_LENGTH];
6868
volatile sig_atomic_t pss_signalFlags[NUM_PROCSIGNALS];
6969
slock_t pss_mutex; /* protects the above fields */
7070

@@ -163,7 +163,7 @@ ProcSignalShmemInit(void)
163163
* Register the current process in the ProcSignal array
164164
*/
165165
void
166-
ProcSignalInit(char *cancel_key, int cancel_key_len)
166+
ProcSignalInit(const uint8 *cancel_key, int cancel_key_len)
167167
{
168168
ProcSignalSlot *slot;
169169
uint64 barrier_generation;
@@ -729,7 +729,7 @@ procsignal_sigusr1_handler(SIGNAL_ARGS)
729729
* fields in the ProcSignal slots.
730730
*/
731731
void
732-
SendCancelRequest(int backendPID, char *cancel_key, int cancel_key_len)
732+
SendCancelRequest(int backendPID, const uint8 *cancel_key, int cancel_key_len)
733733
{
734734
Assert(backendPID != 0);
735735

src/backend/utils/init/globals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pg_time_t MyStartTime;
5050
TimestampTz MyStartTimestamp;
5151
struct ClientSocket *MyClientSocket;
5252
struct Port *MyProcPort;
53-
char MyCancelKey[MAX_CANCEL_KEY_LENGTH];
53+
uint8 MyCancelKey[MAX_CANCEL_KEY_LENGTH];
5454
int MyCancelKeyLength = 0;
5555
int MyPMChildSlot;
5656

src/common/base64.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ static const int8 b64lookup[128] = {
4141
/*
4242
* pg_b64_encode
4343
*
44-
* Encode into base64 the given string. Returns the length of the encoded
45-
* string, and -1 in the event of an error with the result buffer zeroed
46-
* for safety.
44+
* Encode the 'src' byte array into base64. Returns the length of the encoded
45+
* string, and -1 in the event of an error with the result buffer zeroed for
46+
* safety.
4747
*/
4848
int
49-
pg_b64_encode(const char *src, int len, char *dst, int dstlen)
49+
pg_b64_encode(const uint8 *src, int len, char *dst, int dstlen)
5050
{
5151
char *p;
52-
const char *s,
52+
const uint8 *s,
5353
*end = src + len;
5454
int pos = 2;
5555
uint32 buf = 0;
@@ -59,7 +59,7 @@ pg_b64_encode(const char *src, int len, char *dst, int dstlen)
5959

6060
while (s < end)
6161
{
62-
buf |= (unsigned char) *s << (pos << 3);
62+
buf |= *s << (pos << 3);
6363
pos--;
6464
s++;
6565

@@ -113,11 +113,11 @@ pg_b64_encode(const char *src, int len, char *dst, int dstlen)
113113
* buffer zeroed for safety.
114114
*/
115115
int
116-
pg_b64_decode(const char *src, int len, char *dst, int dstlen)
116+
pg_b64_decode(const char *src, int len, uint8 *dst, int dstlen)
117117
{
118118
const char *srcend = src + len,
119119
*s = src;
120-
char *p = dst;
120+
uint8 *p = dst;
121121
char c;
122122
int b = 0;
123123
uint32 buf = 0;

src/common/md5_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pg_md5_hash(const void *buff, size_t len, char *hexsum, const char **errstr)
105105
* (of size MD5_DIGEST_LENGTH) rather than being converted to ASCII hex.
106106
*/
107107
bool
108-
pg_md5_binary(const void *buff, size_t len, void *outbuf, const char **errstr)
108+
pg_md5_binary(const void *buff, size_t len, uint8 *outbuf, const char **errstr)
109109
{
110110
pg_cryptohash_ctx *ctx;
111111

@@ -142,7 +142,7 @@ pg_md5_binary(const void *buff, size_t len, void *outbuf, const char **errstr)
142142
* error context.
143143
*/
144144
bool
145-
pg_md5_encrypt(const char *passwd, const char *salt, size_t salt_len,
145+
pg_md5_encrypt(const char *passwd, const uint8 *salt, size_t salt_len,
146146
char *buf, const char **errstr)
147147
{
148148
size_t passwd_len = strlen(passwd);

src/common/scram-common.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
int
3838
scram_SaltedPassword(const char *password,
3939
pg_cryptohash_type hash_type, int key_length,
40-
const char *salt, int saltlen, int iterations,
40+
const uint8 *salt, int saltlen, int iterations,
4141
uint8 *result, const char **errstr)
4242
{
4343
int password_len = strlen(password);
@@ -62,7 +62,7 @@ scram_SaltedPassword(const char *password,
6262

6363
/* First iteration */
6464
if (pg_hmac_init(hmac_ctx, (uint8 *) password, password_len) < 0 ||
65-
pg_hmac_update(hmac_ctx, (uint8 *) salt, saltlen) < 0 ||
65+
pg_hmac_update(hmac_ctx, salt, saltlen) < 0 ||
6666
pg_hmac_update(hmac_ctx, (uint8 *) &one, sizeof(uint32)) < 0 ||
6767
pg_hmac_final(hmac_ctx, Ui_prev, key_length) < 0)
6868
{
@@ -207,7 +207,7 @@ scram_ServerKey(const uint8 *salted_password,
207207
*/
208208
char *
209209
scram_build_secret(pg_cryptohash_type hash_type, int key_length,
210-
const char *salt, int saltlen, int iterations,
210+
const uint8 *salt, int saltlen, int iterations,
211211
const char *password, const char **errstr)
212212
{
213213
uint8 salted_password[SCRAM_MAX_KEY_LEN];
@@ -290,7 +290,7 @@ scram_build_secret(pg_cryptohash_type hash_type, int key_length,
290290
*(p++) = '$';
291291

292292
/* stored key */
293-
encoded_result = pg_b64_encode((char *) stored_key, key_length, p,
293+
encoded_result = pg_b64_encode(stored_key, key_length, p,
294294
encoded_stored_len);
295295
if (encoded_result < 0)
296296
{
@@ -307,7 +307,7 @@ scram_build_secret(pg_cryptohash_type hash_type, int key_length,
307307
*(p++) = ':';
308308

309309
/* server key */
310-
encoded_result = pg_b64_encode((char *) server_key, key_length, p,
310+
encoded_result = pg_b64_encode(server_key, key_length, p,
311311
encoded_server_len);
312312
if (encoded_result < 0)
313313
{

src/include/common/base64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#define BASE64_H
1212

1313
/* base 64 */
14-
pg_nodiscard extern int pg_b64_encode(const char *src, int len, char *dst, int dstlen);
15-
pg_nodiscard extern int pg_b64_decode(const char *src, int len, char *dst, int dstlen);
14+
pg_nodiscard extern int pg_b64_encode(const uint8 *src, int len, char *dst, int dstlen);
15+
pg_nodiscard extern int pg_b64_decode(const char *src, int len, uint8 *dst, int dstlen);
1616
extern int pg_b64_enc_len(int srclen);
1717
extern int pg_b64_dec_len(int srclen);
1818

src/include/common/md5.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
/* Utilities common to all the MD5 implementations, as of md5_common.c */
2929
extern bool pg_md5_hash(const void *buff, size_t len, char *hexsum,
3030
const char **errstr);
31-
extern bool pg_md5_binary(const void *buff, size_t len, void *outbuf,
31+
extern bool pg_md5_binary(const void *buff, size_t len, uint8 *outbuf,
3232
const char **errstr);
33-
extern bool pg_md5_encrypt(const char *passwd, const char *salt,
33+
extern bool pg_md5_encrypt(const char *passwd, const uint8 *salt,
3434
size_t salt_len, char *buf,
3535
const char **errstr);
3636

src/include/common/scram-common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
extern int scram_SaltedPassword(const char *password,
5353
pg_cryptohash_type hash_type, int key_length,
54-
const char *salt, int saltlen, int iterations,
54+
const uint8 *salt, int saltlen, int iterations,
5555
uint8 *result, const char **errstr);
5656
extern int scram_H(const uint8 *input, pg_cryptohash_type hash_type,
5757
int key_length, uint8 *result,
@@ -64,7 +64,7 @@ extern int scram_ServerKey(const uint8 *salted_password,
6464
uint8 *result, const char **errstr);
6565

6666
extern char *scram_build_secret(pg_cryptohash_type hash_type, int key_length,
67-
const char *salt, int saltlen, int iterations,
67+
const uint8 *salt, int saltlen, int iterations,
6868
const char *password, const char **errstr);
6969

7070
#endif /* SCRAM_COMMON_H */

src/include/libpq/auth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern PGDLLIMPORT bool pg_krb_caseins_users;
3737
extern PGDLLIMPORT bool pg_gss_accept_delegation;
3838

3939
extern void ClientAuthentication(Port *port);
40-
extern void sendAuthRequest(Port *port, AuthRequest areq, const char *extradata,
40+
extern void sendAuthRequest(Port *port, AuthRequest areq, const void *extradata,
4141
int extralen);
4242
extern void set_authn_id(Port *port, const char *id);
4343

src/include/libpq/crypt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern char *encrypt_password(PasswordType target_type, const char *role,
5151
extern char *get_role_password(const char *role, const char **logdetail);
5252

5353
extern int md5_crypt_verify(const char *role, const char *shadow_pass,
54-
const char *client_pass, const char *md5_salt,
54+
const char *client_pass, const uint8 *md5_salt,
5555
int md5_salt_len, const char **logdetail);
5656
extern int plain_crypt_verify(const char *role, const char *shadow_pass,
5757
const char *client_pass,

0 commit comments

Comments
 (0)
0