Web UI broken with sha224

60 views
Skip to first unread message

Attila Tajti

unread,
Jan 17, 2018, 6:57:43 AM1/17/18
to Camlistore
I've noticed the Web UI doesn't work with sha224 blobs properly.

Clicking the refs doesn't show anything, it changes window.location only.

The changes in my CL[1] seemed to fix this issue for me, but I haven't checked it with both sha1 and sha224 blobs yet.


Attila Tajti

unread,
Jan 17, 2018, 8:17:26 AM1/17/18
to Camlistore
Something is still broken. SHA1 blobs are missing and don't seem to work at all. I've tried

cd perkeep.org
git co
-b old 504604e22dcbeb86a597b4a75992f34157701673
rm
-rf tmp && go run make.go
devcam server
devcam put file
... # upload random photos, output:
# sha1-66bfc81fd2440d6b0f78d27fd76a84867673d0bf
# sha1-e1f3812bc9fa79aca71b9d5311c2955b6a277b8a
# sha1-8345ec627a4661a26c6398e7547bc0035c25a84d
# ...
^C
git co master
rm
-rf tmp && go run make.go
devcam server


The old blobs don't seem to work

$ devcam tool describe sha1-66bfc81fd2440d6b0f78d27fd76a84867673d0bf
{
 
"meta": {
   
"sha1-66bfc81fd2440d6b0f78d27fd76a84867673d0bf": {
     
"blobRef": "sha1-66bfc81fd2440d6b0f78d27fd76a84867673d0bf",
     
"camliType": "permanode",
     
"size": 615,
     
"permanode": {
       
"attr": {},
       
"modtime": "0001-01-01T00:00:00Z"
     
}
   
}
 
}
}
$ devcam tool claims sha1
-66bfc81fd2440d6b0f78d27fd76a84867673d0bf
{
 
"claims": null
}
$ devcam tool describe sha1
-e1f3812bc9fa79aca71b9d5311c2955b6a277b8a
{
 
"meta": {
   
"sha1-e1f3812bc9fa79aca71b9d5311c2955b6a277b8a": {
     
"blobRef": "sha1-e1f3812bc9fa79aca71b9d5311c2955b6a277b8a",
     
"camliType": "claim",
     
"size": 740
   
}
 
}
}
$ devcam tool describe sha1
-8345ec627a4661a26c6398e7547bc0035c25a84d
{
 
"meta": {
   
"sha1-8345ec627a4661a26c6398e7547bc0035c25a84d": {
     
"blobRef": "sha1-8345ec627a4661a26c6398e7547bc0035c25a84d",
     
"camliType": "file",
     
"size": 1456,
     
"file": {
       
"fileName": "DSC00700.JPG",
       
"size": 7656409,
       
"mimeType": "image/jpeg",
       
"time": "2017-08-22T08:05:26Z",
       
"modTime": "2017-08-22T08:05:27Z",
       
"wholeRef": "sha1-c1eebf4f9fd7bb1ec786d625079954c48b494838"
     
},
     
"image": {
       
"width": 5472,
       
"height": 3648
     
}
   
}
 
}
}

Eric Drechsel

unread,
Jan 17, 2018, 9:32:16 AM1/17/18
to camli...@googlegroups.com
 I fired up devcam server last night (for the first time in.. awhile, let's say. #dayjob) and also noticed that the detail aspects don't load when you click on a permanode in the default "recent changes" view. *Poking around in the browser inspector*

--
You received this message because you are subscribed to the Google Groups "Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camlistore+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
best, Eric
eric.pdxhub.org

Eric Drechsel

unread,
Jan 17, 2018, 9:41:55 AM1/17/18
to camli...@googlegroups.com
It's been long enough since I worked on the frontend code (well prior to the first gopherjs patch) that debugging this might take awhile, for me. No obvious errors in the console, so i suspect this is purely client-side. or maybe a data format change on the server coupled with lazy validation on the client. should throw an error to console if the data doesn't look right. Want to open an issue?
--
best, Eric
eric.pdxhub.org

Brad Fitzpatrick

unread,
Jan 17, 2018, 9:42:45 AM1/17/18
to camli...@googlegroups.com
Sorry about that. I did run tests, but we don't have Selenium/WebDriver/ChromeDriver tests for the UI.

I'm traveling this week meeting family, so I only have pockets of free time. Any help debugging this would be great.

I'd rather roll forward (just debug & fix this) than roll back (revert back to sha-1). That is why we have releases. Master makes no promises about stability, though we try our best.




On Wed, Jan 17, 2018 at 5:17 AM, Attila Tajti <attila...@gmail.com> wrote:

Pau Fernández

unread,
Jan 17, 2018, 9:43:20 AM1/17/18
to Camlistore
I can confirm this. I am new to Perkeep and installed it a few days ago.
If you add pictures with the WebUI works fine, but not with "camput".
I switched to version 0.9 because of this.

P

Eric Drechsel

unread,
Jan 17, 2018, 9:44:47 AM1/17/18
to camli...@googlegroups.com
Ok, I can take a look

Eric Drechsel

unread,
Jan 17, 2018, 10:00:26 AM1/17/18
to camli...@googlegroups.com
Actually, realized Atilla is already WIP on this with that CL, don't want to duplicate work
--
best, Eric
eric.pdxhub.org

Eric Drechsel

unread,
Jan 17, 2018, 10:01:24 AM1/17/18
to camli...@googlegroups.com
But yeah, webdriver tests, let's do that :D
--
best, Eric
eric.pdxhub.org

Brad Fitzpatrick

unread,
Jan 17, 2018, 10:41:41 AM1/17/18
to camli...@googlegroups.com
Could you start on web tests?

Attila Tajti

unread,
Jan 17, 2018, 10:41:57 AM1/17/18
to Camlistore
My experience with javascript is rather limited, so I just searched the UI code for sha1 and added sha224 where it seemed absolutely necessary. I haven't looked into the issue other than that.

I just wanted to make my geotagging CL work on top of master.

The offending commit is 38f10a7bd0f97475c2b876a7fde08e4ce47bf224 by the way:

all, testhooks: use sha224 by default, add hook for some tests to use sha-1

Apparently, there are no tests for switching to a new hash yet.

Maybe we should just switch back to SHA-1 as the default for the time being, or let the user choose the default hash.

Btw, I haven't found much info on the sha224 shift yet (other than stumbling upon the commit in question).

The related issue https://github.com/perkeep/perkeep/issues/537 was originally about SHA-3, now it's SHA-2. I don't know much about crypto, but the Wikipedia page on SHA-2 mentions SHA512/224 might be a better choice.


On Wednesday, January 17, 2018 at 4:00:26 PM UTC+1, Eric Drechsel wrote:
Actually, realized Atilla is already WIP on this with that CL, don't want to duplicate work
On Wed, Jan 17, 2018 at 6:44 AM, Eric Drechsel <er...@pdxhub.org> wrote:
Ok, I can take a look
On Jan 17, 2018 6:43 AM, "Pau Fernández" <pau....@gmail.com> wrote:
I can confirm this. I am new to Perkeep and installed it a few days ago.
If you add pictures with the WebUI works fine, but not with "camput".
I switched to version 0.9 because of this.

P

On Wednesday, 17 January 2018 12:57:43 UTC+1, Attila Tajti wrote:
I've noticed the Web UI doesn't work with sha224 blobs properly.

Clicking the refs doesn't show anything, it changes window.location only.

The changes in my CL[1] seemed to fix this issue for me, but I haven't checked it with both sha1 and sha224 blobs yet.


--
You received this message because you are subscribed to the Google Groups "Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camlistore+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camlistore+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
best, Eric
eric.pdxhub.org

Mathieu Lonjaret

unread,
Jan 17, 2018, 3:13:48 PM1/17/18
to camli...@googlegroups.com
FYI (in case someone else is also working on it), I know what's wrong,
I'm on it.

Eric Drechsel

unread,
Jan 17, 2018, 6:13:37 PM1/17/18
to camli...@googlegroups.com
Yes, I'll start on browser tests
Reply all
Reply to author
Forward
0 new messages