simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.2k stars 36 forks source link

All Google Takeout Uploads going to Admin User Regardless of API Key #204

Closed rynh closed 3 months ago

rynh commented 3 months ago

Having a strange thing happening ... I first uploaded my google takeout zip to the admin account using a generated API key.

I'm now trying to upload a second set of takeout zips to a separate users account, with their own API key ... but that import is ending up in the admin account still. This is the command I'm using. Does anyone see anything wrong with this? Do the order of the operators matter?

immich-go -server http://x.x.x.x:port -key APIKEY -log-file=log.txt upload -google-photos -create-albums=true Z:\Downloads\user-google-photos\takeout-*.zip

rynh commented 3 months ago

I think i may have foundu the error ... I didn't have an = after -key and the api key itself... derp

I'd recommend throwing an error if no key is given, or maybe this is something with the Immich server?

mmomjian commented 3 months ago

The documentation on the README does not specify an equal sign: -key KEY

If this indeed fixed the problem, it's definitely a bug in either the docs or immich-go itself.

rynh commented 3 months ago

Thanks, yeah I'm importing to a 2nd user and it's working properly with the = sign.

I think immich-go should throw an error when API is not correctly defined to prevent accidentally loading into the admin account.

simulot commented 3 months ago

It depends on many factors. Use = to ensure the behavior.

I'll update the read me file. Thanks

rynh commented 3 months ago

I wonder if this is a security bug with Immich where someone could find a server URL and load it with images/videos to the admin account without needing any credentials...

simulot commented 3 months ago

Closed, better explanation given on the readme