172 posts
Location
USA
Posted 12 October 2016 - 03:26 PM
Hi Guys!
I want to make it so when my OS crashes it will automatically report the error and version to GitHub.
Thanks!
- House
515 posts
Location
Australia
Posted 12 October 2016 - 03:56 PM
You'll need your own (real) server, and write software for the server to do this. Note that anyone can post an issue and abuse through the user you'll set up to post issues on the operating system's user's behalf. Here's a brief outline on what you need to do.
First, you need to authenticate the server. You can do this:
- via OAuth:
https://developer.github.com/v3/oauth/- or with a user token:
https://github.com/settings/tokens/new- or with a password:
https://developer.github.com/v3/auth/#basic-authenticationThen you simply call the create issue endpoint:
https://developer.github.com/v3/issues/#create-an-issue
463 posts
Location
Star Wars
Posted 12 October 2016 - 04:11 PM
I dunno if it would be a great idea, because if a users system crashes often (maybe if it often reboots), then you get hundred of issues.
Also, the user should know that it will be reported.
353 posts
Location
Orewa, New Zealand
Posted 12 October 2016 - 08:44 PM
I dunno if it would be a great idea, because if a users system crashes often (maybe if it often reboots), then you get hundred of issues.
Also, the user should know that it will be reported.
Well, you would simply not post the issue if an open issue exists with the same name/error. It is difficult, but effective against repeat automatic bug reports.
463 posts
Location
Star Wars
Posted 12 October 2016 - 10:23 PM
I dunno if it would be a great idea, because if a users system crashes often (maybe if it often reboots), then you get hundred of issues.
Also, the user should know that it will be reported.
Well, you would simply not post the issue if an open issue exists with the same name/error. It is difficult, but effective against repeat automatic bug reports.
Okay, but what is, if someone edits the code and occur variable errors like error(tostring({}))?
3057 posts
Location
United States of America
Posted 12 October 2016 - 11:09 PM
Okay, but what is, if someone edits the code and occur variable errors like error(tostring({}))?
That's simple. If the MD5 of the file doesn't match, don't post the issue because the user has modified it or are using an older version.
463 posts
Location
Star Wars
Posted 13 October 2016 - 12:53 PM
Okay, but what is, if someone edits the code and occur variable errors like error(tostring({}))?
That's simple. If the MD5 of the file doesn't match, don't post the issue because the user has modified it or are using an older version.
but then you've to create MD5 hashes form all OS files, and comparing to all versions, existing (He wanted to get all errors from all versions). Reporting the error would take much time.
275 posts
Location
Turkey
Posted 13 October 2016 - 12:55 PM
but then you've to create MD5 hashes form all OS files, and comparing to all versions, existing (He wanted to get all errors from all versions). Reporting the error would take much time.
It would be a single command (under Linux) to md5 all files in a directory, let me check my zsh history for the command.
EDIT: The command is:
find . -type f -exec md5sum {} \; > dir.md5
Edited on 13 October 2016 - 10:56 AM
463 posts
Location
Star Wars
Posted 13 October 2016 - 12:56 PM
but then you've to create MD5 hashes form all OS files, and comparing to all versions, existing (He wanted to get all errors from all versions). Reporting the error would take much time.
It would be a single command (under Linux) to md5 all files in a directory, let me check my zsh history for the command.
A single command which takes some minutes.
275 posts
Location
Turkey
Posted 13 October 2016 - 01:02 PM
A single command which takes some minutes.
It will take minutes if you have gigantic files, but then a CC os probably doesn't have any files that is that large.
Edited on 13 October 2016 - 11:02 AM
463 posts
Location
Star Wars
Posted 16 October 2016 - 04:55 PM
A single command which takes some minutes.
It will take minutes if you have gigantic files, but then a CC os probably doesn't have any files that is that large.
Also you can hash the native files, delete them (except the md5 hash) and post many bugs.
1583 posts
Location
Germany
Posted 16 October 2016 - 08:19 PM
You don't have to hash anything at all. If someone really wants to mess this up they can claim to have the correct file by submitting the correct md5. They just have to bypass your Lua code and call the API on their own.
Edited on 16 October 2016 - 06:20 PM
3057 posts
Location
United States of America
Posted 16 October 2016 - 09:18 PM
You don't have to hash anything at all. If someone really wants to mess this up they can claim to have the correct file by submitting the correct md5. They just have to bypass your Lua code and call the API on their own.
The idea here is to prevent someone's stupidity from auto-reporting errors they created, not to prevent against malicious intent. We've already established that the github account will be fully accessible by anyone who looks at the code.
1583 posts
Location
Germany
Posted 16 October 2016 - 10:52 PM
You don't have to hash anything at all. If someone really wants to mess this up they can claim to have the correct file by submitting the correct md5. They just have to bypass your Lua code and call the API on their own.
The idea here is to prevent someone's stupidity from auto-reporting errors they created, not to prevent against malicious intent. We've already established that the github account will be fully accessible by anyone who looks at the code.
Oh, okay. I should read the whole post next time. Sorry :/