senooken JP Social
  • FAQ
  • Login
senooken JP Socialはsenookenの専用分散SNSです。
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. xor_zt (xor_zt@molotov.sanrizuka-struggle.com)'s status on Sunday, 01-Sep-2024 14:15:15 JST xor_zt xor_zt
    in reply to
    • ちとっぴー(昨日: 1 / 今日: 0)
    • れの

    @leno
    @citoppig
    ということで昨日のやつ(gitのextraheader問題)雑調査しました報告をば (ツリーにあります)

    In conversation about 9 months ago from molotov.sanrizuka-struggle.com permalink
    • xor_zt (xor_zt@molotov.sanrizuka-struggle.com)'s status on Sunday, 01-Sep-2024 14:15:16 JST xor_zt xor_zt
      in reply to
      • れの

      @leno http経由でファイル取得する場合全部に適用されるはず

      https://github.com/git/git/blob/4590f2e9412378c61eac95966709c78766d326ba/http.c#L522-L531
      こっから追ってくとhttp_copy_default_headers → http_request → http_request_reauth → http_get_file / http_get_strbuf / ...と続く

      Edit: http.cの方あんまり関係なかったのでツリー読んでくれ

      In conversation about 9 months ago permalink
    • れの (leno@don.leno3s.net)'s status on Sunday, 01-Sep-2024 14:15:16 JST れの れの
      in reply to

      @xor_zt その理屈だとだとinsteadOfしたときにcloneとls-remoteで可否が変わるの謎じゃない?

      In conversation about 9 months ago permalink
    • xor_zt (xor_zt@molotov.sanrizuka-struggle.com)'s status on Sunday, 01-Sep-2024 14:15:16 JST xor_zt xor_zt
      in reply to
      • れの

      @leno 今ソースコード読んで得られた結論です

      * バックエンドにcurlを使っていることは両方変わらない
      - `ag --cc "repository '%s' not found"` で検索かけるとremote-curl.c:L521しか引っかからない
      * cloneの方ではいくつかプロジェクト固有設定の類を飛ばしている
      - そもそもグローバルな設定しか見ないみたいな感じ
      - https://github.com/git/git/blob/4590f2e9412378c61eac95966709c78766d326ba/builtin/clone.c#L1298
      - 対するls-remoteは https://github.com/git/git/blob/4590f2e9412378c61eac95966709c78766d326ba/builtin/ls-remote.c#L118
      * またcurl側でもURL側直接指定とダブったときうまく行かないことを確認している
      - `curl -v -H "AUTHORIZATION: basic hogefuga" http://yeah:wow@example.com` はbasic hogefugaの方だけが記述されます
      - どちらかというとこれが一番影響している可能性が高い (URL自体は同時に指定できているけれども, ヘッダとして指定されたほうが優先されている)

      In conversation about 9 months ago permalink

      Attachments


      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        git/builtin/clone.c at 4590f2e9412378c61eac95966709c78766d326ba · git/git
        Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documen...
      2. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        git/builtin/ls-remote.c at 4590f2e9412378c61eac95966709c78766d326ba · git/git
        Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documen...
    • xor_zt (xor_zt@molotov.sanrizuka-struggle.com)'s status on Sunday, 01-Sep-2024 14:15:16 JST xor_zt xor_zt
      in reply to
      • れの

      @leno

      * 貰ったログにおいて, httpにスキームが変わっているけど認証系の情報が削られているように見えたのは, transport_anonymize_url関数を通して削除しているため
      - https://github.com/git/git/blob/4590f2e9412378c61eac95966709c78766d326ba/remote-curl.c#L521-L522
      * つまるところextraheaderの適用有無ではなく, 以下の機序によるものと推測されます
      - ls-remoteはローカルリポジトリのconfigを基準に見る
      - cloneはグローバルconfigを基準に見る
      - ローカルにextraheader設定があった
      - curl側で二重指定されているうちextraheader側が優先された
      - 認証失敗 + insteadOfは成功

      In conversation about 9 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        git/remote-curl.c at 4590f2e9412378c61eac95966709c78766d326ba · git/git
        Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documen...
    • れの (leno@don.leno3s.net)'s status on Sunday, 01-Sep-2024 14:15:16 JST れの れの
      in reply to

      @xor_zt ざっくり理解しました おげ~~~という気持ちになった

      In conversation about 9 months ago permalink
    • xor_zt (xor_zt@molotov.sanrizuka-struggle.com)'s status on Sunday, 01-Sep-2024 14:15:16 JST xor_zt xor_zt
      in reply to
      • れの

      @leno 言われてみればcloneは別にローカルの設定読まないんだよね だからローカル設定で差分が出る + curl側の仕様で優先順位があったという二重苦

      In conversation about 9 months ago permalink
    • れの (leno@don.leno3s.net)'s status on Sunday, 01-Sep-2024 14:15:16 JST れの れの
      in reply to

      @xor_zt cloneのそれは言われてみればまあそうだが、curlの方は完全に罠だな

      In conversation about 9 months ago permalink
    • れの (leno@don.leno3s.net)'s status on Sunday, 01-Sep-2024 14:15:17 JST れの れの

      優先的にextraheaderを見に行くタイプのgitのサブコマンド、他にどれだけあるんだろうかと思いつつ、調べる手段をよくわかっていない

      In conversation about 9 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

senooken JP Social is a social network, courtesy of senooken. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All senooken JP Social content and data are available under the Creative Commons Attribution 3.0 license.