Skip to content

Commit 1261b90

Browse files
Merge pull request #2997 from ipfs/feat/gpg-key
assets: add [email protected] GPG key
2 parents 4b793f9 + dae854e commit 1261b90

File tree

8 files changed

+163
-83
lines changed

8 files changed

+163
-83
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Please put all issues regarding the Go IPFS _implementation_ in [this repo](http
4747

4848
The IPFS protocol and its implementations are still in heavy development. This means that there may be problems in our protocols, or there may be mistakes in our implementations. And -- though IPFS is not production-ready yet -- many people are already running nodes in their machines. So we take security vulnerabilities very seriously. If you discover a security issue, please bring it to our attention right away!
4949

50-
If you find a vulnerability that may affect live deployments -- for example, by exposing a remote execution exploit -- please send your report privately to [email protected]. Please DO NOT file a public issue.
50+
If you find a vulnerability that may affect live deployments -- for example, by exposing a remote execution exploit -- please send your report privately to [email protected]. Please DO NOT file a public issue. The GPG key for [email protected] is [4B9665FB 92636D17 7C7A86D3 50AAE8A9 59B13AF3](https://pgp.mit.edu/pks/lookup?op=get&search=0x50AAE8A959B13AF3).
5151

5252
If the issue is a protocol weakness that cannot be immediately exploited or something not yet deployed, just discuss it openly.
5353

assets/assets.go

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
//go:generate go-bindata -pkg=assets init-doc ../vendor/dir-index-html-v1.0.0
1+
//go:generate go-bindata -pkg=assets -prefix=$GOPATH/src/gx/ipfs/QmQfeKxQtBN721pekQh6Jq24adFUjnU65YdY3GNczfuG2T init-doc $GOPATH/src/gx/ipfs/QmQfeKxQtBN721pekQh6Jq24adFUjnU65YdY3GNczfuG2T/dir-index-html
22
//go:generate gofmt -w bindata.go
33

44
package assets
55

66
import (
77
"bytes"
88
"fmt"
9+
"os"
910
"path/filepath"
1011

1112
"github.com/ipfs/go-ipfs/core"
1213
"github.com/ipfs/go-ipfs/core/coreunix"
1314
uio "github.com/ipfs/go-ipfs/unixfs/io"
1415
cid "gx/ipfs/QmXfiyr2RWEXpVDdaYnD2HNiBk6UBddsvEP4RPfXb6nGqY/go-cid"
16+
17+
// this import keeps gx from thinking the dep isn't used
18+
_ "gx/ipfs/QmQfeKxQtBN721pekQh6Jq24adFUjnU65YdY3GNczfuG2T/dir-index-html"
1519
)
1620

1721
// initDocPaths lists the paths for the docs we want to seed during --init
@@ -22,16 +26,18 @@ var initDocPaths = []string{
2226
filepath.Join("init-doc", "contact"),
2327
filepath.Join("init-doc", "security-notes"),
2428
filepath.Join("init-doc", "quick-start"),
29+
filepath.Join("init-doc", "ping"),
2530
}
2631

2732
// SeedInitDocs adds the list of embedded init documentation to the passed node, pins it and returns the root key
2833
func SeedInitDocs(nd *core.IpfsNode) (*cid.Cid, error) {
2934
return addAssetList(nd, initDocPaths)
3035
}
3136

37+
var initDirPath = filepath.Join(os.Getenv("GOPATH"), "gx", "ipfs", "QmQfeKxQtBN721pekQh6Jq24adFUjnU65YdY3GNczfuG2T", "dir-index-html")
3238
var initDirIndex = []string{
33-
filepath.Join("..", "vendor", "dir-index-html-v1.0.0", "knownIcons.txt"),
34-
filepath.Join("..", "vendor", "dir-index-html-v1.0.0", "dir-index.html"),
39+
filepath.Join(initDirPath, "knownIcons.txt"),
40+
filepath.Join(initDirPath, "dir-index.html"),
3541
}
3642

3743
func SeedInitDirIndex(nd *core.IpfsNode) (*cid.Cid, error) {

assets/bindata.go

+138-73
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/init-doc/ping

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ipfs

assets/init-doc/security-notes

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Please note the following:
1414
user provided data. But please point any problems out to us in a
1515
github issue, or email [email protected] privately.
1616

17+
18+
- 4B9665FB 92636D17 7C7A86D3 50AAE8A9 59B13AF3
19+
- https://pgp.mit.edu/pks/lookup?op=get&search=0x50AAE8A959B13AF3
20+
1721
- ipfs uses encryption for all communication, but it's NOT PROVEN SECURE
1822
YET! It may be totally broken. For now, the code is included to make
1923
sure we benchmark our operations with encryption in mind. In the future,

core/corehttp/gateway_indexPage.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ type directoryItem struct {
2525
var listingTemplate *template.Template
2626

2727
func init() {
28-
assetPath := "../vendor/dir-index-html-v1.0.0/"
29-
knownIconsBytes, err := assets.Asset(assetPath + "knownIcons.txt")
28+
knownIconsBytes, err := assets.Asset("dir-index-html/knownIcons.txt")
3029
if err != nil {
3130
panic(err)
3231
}
@@ -53,7 +52,7 @@ func init() {
5352
}
5453

5554
// Directory listing template
56-
dirIndexBytes, err := assets.Asset(assetPath + "dir-index.html")
55+
dirIndexBytes, err := assets.Asset("dir-index-html/dir-index.html")
5756
if err != nil {
5857
panic(err)
5958
}

package.json

+7
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@
281281
"hash": "QmRcAVqrbY5wryx7hfNLtiUZbCcstzaJL7YJFBboitcqWF",
282282
"name": "go-ipld-cbor",
283283
"version": "0.3.0"
284+
},
285+
{
286+
"author": "lgierth",
287+
"hash": "QmQfeKxQtBN721pekQh6Jq24adFUjnU65YdY3GNczfuG2T",
288+
"name": "dir-index-html",
289+
"version": "1.0.3",
290+
"comment": "This one needs code updates in assets/assets.go too."
284291
}
285292
],
286293
"gxVersion": "0.4.0",

test/sharness/lib/test-lib-hashes.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# this file defines several useful hashes used across the test codebase.
22
# thus they can be defined + changed in one place
33

4-
HASH_WELCOME_DOCS="QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG"
5-
HASH_GATEWAY_ASSETS="QmXB7PLRWH6bCiwrGh2MrBBjNkLv3mY3JdYXCikYZSwLED"
6-
HASH_HELP_PAGE="QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7"
4+
HASH_WELCOME_DOCS="QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T"
75
HASH_EMPTY_DIR="QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"

0 commit comments

Comments
 (0)