-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: download shared data without auth #117
base: master
Are you sure you want to change the base?
feat: download shared data without auth #117
Conversation
src/file/file.ts
Outdated
async downloadFromSharedPod(podReference: string | EncryptedReference, fullPath: string): Promise<Data> { | ||
assertEncryptedReference(podReference) | ||
|
||
const info = await getSharedPodInfo(this.accountData.connection.bee, podReference) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can be executed without authentication as it states but the first parameter of getSharedPodInfo
comes from this.accountData
. without authentication it should be null, shouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current implementation, it will never be null, because after the connection is created, it is stored in this instance.
src/file/file.ts
Outdated
const info = await this.getSharedInfo(fileReference) | ||
const data = await downloadData( | ||
this.accountData.connection.bee, | ||
combine(info.meta.file_path, info.meta.file_name), | ||
prepareEthAddress(info.source_address), | ||
this.accountData.connection.options?.downloadOptions, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which is really strange for me is that you only need the file path and the ethereum address of the feed owner from the info
.
Even if the info
lies under an encrypted reference, the data that can be downloaded by that is unenrypted.
I thought by resolving #19 these problems disappeared.
dd2f45b
to
7a20b02
Compare
7a20b02
to
b813c0c
Compare
Close #68