LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.35k stars 299 forks source link

Cannot share Smart Albums #2053

Closed TheKrafter closed 9 months ago

TheKrafter commented 11 months ago

Detailed description of the problem [REQUIRED]

A clear and concise description of what the bug is.

When I create a Tag album, anonymous users can see it, but cannot see the photos inside it. (There are no errors in the network tab) I can make individual photos publicly visible, and share links to those. This applies to only Tag albums.

My site for reference: https://photos.krafterdev.xyz/gallery

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Create an Tag Album
  2. Make it public
  3. Open the link to said album, or go to the album in the gallery when not logged in.
  4. You can open the album, but the photos in it are not accessible.

Screenshots If applicable, add screenshots to help explain your problem. For example, my Bugs album looks like this when logged in (photos with the bug tag): image

And has the proper permissions set: image

However, looks like this to users who are not logged in: image

As do all my other public albums: image

Output of the diagnostics [REQUIRED]

(Settings => Diagnostics or https://example.com/Diagnostics or php artisan lychee:diagnostics)

``` Diagnostics ----------- Warning: Dropbox import not working. dropbox_key is empty. Warning: APP_URL contains a sub-path. This may impact your WebAuthn authentication. Warning: Default timezone not properly set; you might experience strange results when importing photos without explicit EXIF timezone Warning: git (software) is not available. Foreign key: access_permissions.user_id → users.id : CASCADE Foreign key: albums.id → base_albums.id : NO ACTION Foreign key: base_albums.owner_id → users.id : NO ACTION Foreign key: jobs_history.owner_id → users.id : NO ACTION Foreign key: photos.album_id → albums.id : NO ACTION Foreign key: photos.owner_id → users.id : NO ACTION Foreign key: size_variants.photo_id → photos.id : NO ACTION Foreign key: sym_links.size_variant_id → size_variants.id : NO ACTION Foreign key: tag_albums.id → base_albums.id : NO ACTION System Information ------------------ Lychee Version (git): master (c77346a) -- Up to date (2 hours ago). DB Version: 4.13.0 composer install: --no-dev APP_ENV: production APP_DEBUG: false System: Linux PHP Version: 8.2.7 PHP User agent: Lychee/4 (https://lycheeorg.github.io/) Timezone: UTC Max uploaded file size: 2048M Max post size: 2048M Max execution time: 20000 SQLite Version: 3.40.1 exec() Available: yes Imagick Available: 1 Imagick Enabled: 1 Imagick Version: 1691 GD Version: 2.3.3 Number of foreign key: 9 found. Config Information ------------------ version: 041300 check_for_updates: 0 sorting_photos_col: taken_at sorting_photos_order: DESC sorting_albums_col: max_taken_at sorting_albums_order: DESC imagick: 1 skip_duplicates: 0 small_max_width: 0 small_max_height: 360 medium_max_width: 1920 medium_max_height: 1080 lang: en image_overlay_type: exif default_license: reserved compression_quality: 90 grants_full_photo_access: 1 delete_imported: 0 mod_frame_enabled: 1 mod_frame_refresh: 30 thumb_2x: 1 small_2x: 1 medium_2x: 1 landing_page_enable: 1 site_owner: Krafter landing_title: Krafter landing_subtitle: Photography sm_facebook_url: https://krafterdev.xyz/socials sm_flickr_url: https://krafterdev.xyz/socials sm_twitter_url: https://krafterdev.xyz/socials sm_instagram_url: https://krafterdev.xyz/socials sm_youtube_url: https://krafterdev.xyz/socials landing_background: uploads/medium/19/cd/980508950b88aba52d5484b6c6e1.JPG site_title: KrafterPhotos footer_show_copyright: 1 site_copyright_begin: 2023 site_copyright_end: 2023 footer_additional_text: footer_show_social_media: 0 public_search: 1 SL_enable: 0 SL_for_admin: 0 recent_age: 1 grants_download: 0 photos_wraparound: 1 map_display: 1 zip64: 1 map_display_public: 0 map_provider: Wikimedia force_32bit_ids: 0 map_include_subalbums: 1 update_check_every_days: 3 has_exiftool: 1 share_button_visible: 1 import_via_symlink: 0 has_ffmpeg: 1 location_decoding: 1 location_decoding_timeout: 30 location_show: 1 location_show_public: 0 rss_enable: 0 rss_recent_days: 7 rss_max_items: 100 prefer_available_xmp_metadata: 0 editor_enabled: 1 lossless_optimization: 0 swipe_tolerance_x: 150 swipe_tolerance_y: 250 local_takestamp_video_formats: .avi|.mov log_max_num_line: 1000 unlock_password_photos_with_url_param: 1 nsfw_visible: 1 nsfw_blur: 0 nsfw_warning: 1 nsfw_warning_admin: 0 nsfw_banner_override: map_display_direction: 1 album_subtitle_type: oldstyle upload_processing_limit: 4 public_photos_hidden: 0 new_photos_notification: 0 legacy_id_redirection: 1 zip_deflate_level: 6 SA_enabled: 1 default_album_protection: 1 album_decoration: all album_decoration_orientation: row allow_username_change: 1 auto_fix_orientation: 1 use_job_queues: 0 random_album_id: starred use_last_modified_date_when_no_exif_date: 0 ffmpeg_path: /usr/bin/ffmpeg ffprobe_path: /usr/bin/ffprobe layout: justified ```

Browser and system

Server: Running in the official Docker container, on Fedora Linux 37 (Server Edition). Proxied thru Nginx on Ubuntu Server LTS, connected to backend via Tailscale.

Client: Fedora Linux 39 (Workstation) w/ GNOME, Firefox 119.0 (rpm) Also tried Mobile Client: postmarketOS v23.06.1 (aarch64 ofc) w/ Phosh, GNOME Web (formerly Epiphany)

TheKrafter commented 11 months ago

Just tested with a password-protected Album, the issue is the same.

TheKrafter commented 11 months ago

Also, if it helps, the proper permissions are shown when looking at an image itself too image

TheKrafter commented 11 months ago

Ah, when i share a link to images themselves in tagged albums (should checked this earlier): 401 UnAuthenticatedException

TheKrafter commented 11 months ago

Things seem to work properly in normal albums: https://photos.krafterdev.xyz/view?p=RJEuFDucxRSnAWpTtUSRzxsq

TheKrafter commented 11 months ago

It appears this also happens when sharing a tag album with normal users.

TheKrafter commented 11 months ago

This does NOT happen, as it turns out, with Normal albums: https://photos.krafterdev.xyz/gallery#ljIWk62yOz2LOl9GIds5C5BP

ildyria commented 10 months ago

Sorry for the delay, I need to investigate that one. Unfortunately my time is quite limited. :(

TheKrafter commented 10 months ago

No worries! I've been making due with normal albums for now.

ildyria commented 9 months ago

Fixed with Version 5: sharing tag albums is no longer an option.