This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Commit 8df413f
committed
plumbing/object: fix pgp signature encoder/decoder
The way of reading pgp signatures was searching for pgp begin line in
the header. This caused problems when this string appeared and was not
part of the signature. For example if it appears in the message as an
example or is part of the author name the decoder starts treating it as
a signature. In this state the code was not able to notice then the
header ended so it entered in an infinite loop searching for pgp end
string.
Now it uses the same method as original git. Searches for gpgsig section
in header and starts getting all lines until the next part.
In encoder the string used to add signatures was incorrect. It is now
changed to the proper "gpgsig" string instead of "pgpsig".
Signed-off-by: Javi Fontan <jfontan@gmail.com>1 parent 9f00789 commit 8df413f
2 files changed
+45
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 185 | + | |
190 | 186 | | |
191 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
192 | 191 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 192 | | |
202 | 193 | | |
203 | 194 | | |
| |||
217 | 208 | | |
218 | 209 | | |
219 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
220 | 214 | | |
221 | 215 | | |
222 | 216 | | |
| |||
269 | 263 | | |
270 | 264 | | |
271 | 265 | | |
272 | | - | |
| 266 | + | |
273 | 267 | | |
274 | 268 | | |
275 | 269 | | |
276 | 270 | | |
277 | 271 | | |
278 | | - | |
| 272 | + | |
| 273 | + | |
279 | 274 | | |
280 | 275 | | |
281 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
327 | 359 | | |
328 | 360 | | |
329 | 361 | | |
| |||
0 commit comments