MCPcopy Create free account
hub / github.com/git/git / reject_invalid_nonce

Function reject_invalid_nonce

send-pack.c:415–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413#define NONCE_LEN_LIMIT 256
414
415static void reject_invalid_nonce(const char *nonce, int len)
416{
417 int i = 0;
418
419 if (NONCE_LEN_LIMIT <= len)
420 die("the receiving end asked to sign an invalid nonce <%.*s>",
421 len, nonce);
422
423 for (i = 0; i < len; i++) {
424 int ch = nonce[i] & 0xFF;
425 if (isalnum(ch) ||
426 ch == '-' || ch == '.' ||
427 ch == '/' || ch == '+' ||
428 ch == '=' || ch == '_')
429 continue;
430 die("the receiving end asked to sign an invalid nonce <%.*s>",
431 len, nonce);
432 }
433}
434
435static void get_commons_through_negotiation(struct repository *r,
436 const char *url,

Callers 1

send_packFunction · 0.85

Calls 1

dieFunction · 0.70

Tested by

no test coverage detected