]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Git 2.25.3 v2.25.3
authorJunio C Hamano <gitster@pobox.com>
Wed, 18 Mar 2020 01:12:01 +0000 (18:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Mar 2020 01:12:01 +0000 (18:12 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1  2 
Documentation/RelNotes/2.25.3.txt
GIT-VERSION-GEN
RelNotes
credential.h
fsck.c

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..15f7f21f1002e9d35d8a5b91643e6aa268aa273d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++Git v2.25.3 Release Notes
++=========================
++
++This release merges the security fix that appears in v2.17.4; see
++the release notes for that version for details.
diff --cc GIT-VERSION-GEN
index 61023f4097f7660237a425d1dd91cd6d11272078,8480762ca5f12c6fef6981c81d3d342633c47a01..26fbde3f210b71d655078318a8ef0a2cb1210ab4
@@@ -1,7 -1,7 +1,7 @@@
  #!/bin/sh
  
  GVF=GIT-VERSION-FILE
- DEF_VER=v2.25.2
 -DEF_VER=v2.24.2
++DEF_VER=v2.25.3
  
  LF='
  '
diff --cc RelNotes
index 19e8340eb9344c3d2151d87917e4770569d70383,bb01306eefaca2f5f08da190cfa1cfcd859ee96d..96469c66f863b3b6b3f8f5717d4874c94baabb09
+++ b/RelNotes
@@@ -1,1 -1,1 +1,1 @@@
- Documentation/RelNotes/2.25.2.txt
 -Documentation/RelNotes/2.24.2.txt
++Documentation/RelNotes/2.25.3.txt
diff --cc credential.h
index a5a3ee9bb823e51e785631f90f4e46a6e94a7def,122a23cd2f1418fcee331d327c0276bdaa2cd0b3..96d602eb3b2a548e7371c38ed2eaf9a7dd79c556
@@@ -172,8 -29,21 +172,21 @@@ void credential_reject(struct credentia
  int credential_read(struct credential *, FILE *);
  void credential_write(const struct credential *, FILE *);
  
- /* Parse a URL into broken-down credential fields. */
+ /*
+  * Parse a url into a credential struct, replacing any existing contents.
+  *
 - * Ifthe url can't be parsed (e.g., a missing "proto://" component), the
++ * If the url can't be parsed (e.g., a missing "proto://" component), the
+  * resulting credential will be empty but we'll still return success from the
+  * "gently" form.
+  *
+  * If we encounter a component which cannot be represented as a credential
+  * value (e.g., because it contains a newline), the "gently" form will return
+  * an error but leave the broken state in the credential object for further
+  * examination.  The non-gentle form will issue a warning to stderr and return
+  * an empty credential.
+  */
  void credential_from_url(struct credential *, const char *url);
+ int credential_from_url_gently(struct credential *, const char *url, int quiet);
  
  int credential_match(const struct credential *have,
                     const struct credential *want);
diff --cc fsck.c
index 640d813d8430c6835ab1068c0c4512560e91c2b8,ea46eeade6bda1d1b7ceb10e1df85864eb2fe03b..dc6f6ac3de193dec0854b8b2242de1544abd1de0
--- 1/fsck.c
--- 2/fsck.c
+++ b/fsck.c
@@@ -910,8 -936,33 +911,21 @@@ done
        return ret;
  }
  
 -static int fsck_tag(struct tag *tag, const char *data,
 -      unsigned long size, struct fsck_options *options)
 -{
 -      struct object *tagged = tag->tagged;
 -
 -      if (!tagged)
 -              return report(options, &tag->object, FSCK_MSG_BAD_TAG_OBJECT, "could not load tagged object");
 -
 -      return fsck_tag_buffer(tag, data, size, options);
 -}
 -
+ static int check_submodule_url(const char *url)
+ {
+       struct credential c = CREDENTIAL_INIT;
+       int ret;
+       if (looks_like_command_line_option(url))
+               return -1;
+       ret = credential_from_url_gently(&c, url, 1);
+       credential_clear(&c);
+       return ret;
+ }
  struct fsck_gitmodules_data {
 -      struct object *obj;
 +      const struct object_id *oid;
        struct fsck_options *options;
        int ret;
  };
@@@ -935,9 -985,8 +949,9 @@@ static int fsck_gitmodules_fn(const cha
                                    "disallowed submodule name: %s",
                                    name);
        if (!strcmp(key, "url") && value &&
-           looks_like_command_line_option(value))
+           check_submodule_url(value) < 0)
 -              data->ret |= report(data->options, data->obj,
 +              data->ret |= report(data->options,
 +                                  data->oid, OBJ_BLOB,
                                    FSCK_MSG_GITMODULES_URL,
                                    "disallowed submodule url: %s",
                                    value);