netcreateorg / netcreate-2018

Please report bugs, problems, ideas in the project Issues page: https://github.com/netcreateorg/netcreate-2018/issues
Other
11 stars 2 forks source link

Protect against SOCKS corruption #133

Open benloh opened 3 years ago

benloh commented 3 years ago

Joshua and Kalani report:

I think we got hit with the SOCKS server again last night. It corrupted the data, creating a node with no Label. Once we found that it wasn’t hard to fix but … begs the question of what else we might be able to do to bulletproof that? In the absence of a testable fix for SOCKS, could we maybe add a check on the first read of the file that if a label or other key element is missing it gets replaced with a label called “error” or something so that it won’t choke, at least?

benloh commented 3 years ago

Ben asks:

How do you know it's the SOCKS server error? Are you seeing the "invalid compressed data" error? Do you have an example of the bad data that was created? Is it completely missing the "Label" field or is "Label" undefined?

benloh commented 3 years ago

Kalani responds:

No idea, only that it’s behaving the same way (server just drops). The bad data that created issues was completely missing the label field, not even undefined or blank. Looked like this (not the actual line with the error but I double checked to make sure that all the other attributes were there, including the loki ID and all the metadata about revision/creation:

{"id":1,"attributes":{"Node_Type":"Place","Extra Info":"","Notes":""},"_nlog":["H213-INST-Q75"],"meta":{"revision":0,"created":1538403936913,"version":0,"updated":1538404702691},"$loki”:1}

benloh commented 3 years ago

@jdanish @kalanicraig just letting you know SOCKs issue is recorded here.

benloh commented 3 years ago

@jdanish @kalanicraig Do you happen to have any specific error messages (especially from the javascript console) that is related to the missing node label? That will help me reproduce the problem and make sure I'm addressing the right issue.

benloh commented 3 years ago

@jdanish @kalanicraig Based on some quick tests, we DO clean data being loaded and if a label is missing from the node object in the loki file, we fallback to an empty string. There shouldn't be an error generated.

So we really need to know what the error was in order to reproduce the problem and fix it.

jdanish commented 3 years ago

That’s really odd. Next time we can restart the server I’ll dump to a log file so we can see if any errors appear. We’ve tried everything we can think of and can’t reproduce it but the second we stop trying... some student does it again ...