jcline / fuse-google-drive

A fuse filesystem wrapper for Google Drive.
GNU General Public License v2.0
285 stars 48 forks source link

Newline in redirecturi breaks request URI construction #14

Closed cgranade closed 12 years ago

cgranade commented 12 years ago

If there is a newline in the file redirecturi, then it will be added verbatim to the initial request URI at line 331 of gd_interface.c, resulting in the constructed URI missing the client ID.

jcline commented 12 years ago

load_file in gdi_interface.c should strip a newline if it is the very last character in the file, but otherwise it won't. I think I am just going to hardcode the redirect uri, since it is actually a constant thing.

However, this bug likely also applies to clientsecrets and clientid.

jcline commented 12 years ago

redirecturi has now been hardcoded. Not sure if this is still an issue for clientsecrets or clientid.

jcline commented 12 years ago

69251c81f623e3ea92e06b0cdff42bc31822f9f7 should have fixed this, I think. It strips all newline characters from the data read in load_file(). This might be an issue should someone want to use load_file() for something that should have newlines, but I'll deal with that if it ever becomes an issue...