Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression v4.2.1 #882

Closed
pchampio opened this issue Jan 24, 2021 · 6 comments
Closed

Regression v4.2.1 #882

pchampio opened this issue Jan 24, 2021 · 6 comments
Labels
bug Something isn't working High Priority High priority issues

Comments

@pchampio
Copy link
Contributor

Public password protected albums doesn't work anymore

POST https://YYYY.XXXXX.com/api/Album::get 500
main.js?1611500729:4757 {description: "Server error or API not found.", params: {…}, response: ""}

description: "Server error or API not found."params: {function: "Album::get", albumID: "16011235457899", password: "XXXX"}response: ""__proto__: Object

Output of the diagnostics [REQUIRED]

Diagnostics
-----------
Warning: Dropbox import not working. dropbox_key is empty.
Warning: lossless_optimization set to 1 but svgo not found!
Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
Warning: You may experience problems when uploading a photos of large size. Take a look in the FAQ for details.
Warning: You may experience problems when uploading a large amount of photos. Take a look in the FAQ for details.

System Information
------------------
Lychee Version (git):            master (a368964) - Data not in Cache
DB Version:                      4.2.1

composer install:                --no-dev
APP_ENV:                         production
APP_DEBUG:                       false

System:                          Linux
PHP Version:                     7.4
Max uploaded file size:          2M
Max post size:                   8M
PostgreSQL Version:              PostgreSQL 10.13 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit

Imagick:                         1
Imagick Active:                  1
Imagick Version:                 1691
GD Version:                      2.3.0

Config Information
------------------
version:                         040201
check_for_updates:               0
sorting_Photos_col:              takestamp
sorting_Photos_order:            ASC
sorting_Albums_col:              min_takestamp
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
layout:                          1
image_overlay:                   1
image_overlay_type:              exif
default_license:                 CC-BY-SA-4.0
compression_quality:             90
full_photo:                      1
delete_imported:                 0
Mod_Frame:                       1
Mod_Frame_refresh:               30
thumb_2x:                        1
small_2x:                        1
medium_2x:                       1
landing_page_enable:             0
landing_owner:                   Pierre C
landing_title:                   Pierre C
landing_subtitle:
landing_facebook:
landing_flickr:
landing_twitter:
landing_instagram:
landing_youtube:
landing_background:              dist/cat.jpg
site_title:                      Albums de Pierre
site_copyright_enable:           0
site_copyright_begin:            2019
site_copyright_end:              2019
additional_footer_text:
display_social_in_gallery:       0
public_search:                   1
SL_enable:                       0
SL_for_admin:                    0
public_recent:                   1
recent_age:                      7
public_starred:                  0
downloadable:                    1
photos_wraparound:               0
map_display:                     0
zip64:                           1
map_display_public:              0
map_provider:                    Wikimedia
force_32bit_ids:                 0
map_include_subalbums:           0
update_check_every_days:         3
has_exiftool:                    1
share_button_visible:            1
import_via_symlink:              1
has_ffmpeg:                      1
location_decoding:               0
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:           1
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:                    0
nsfw_warning_admin:              0

Browser and system

Tested latest on firefox and chrome

@ildyria ildyria added bug Something isn't working High Priority High priority issues labels Jan 24, 2021
@ildyria
Copy link
Member

ildyria commented Jan 24, 2021

Oupsie O.O

@ildyria
Copy link
Member

ildyria commented Jan 24, 2021

I cannot reproduce. O.o

@pchampio
Copy link
Contributor Author

pchampio commented Jan 24, 2021

I didn't log the user into a account, if that can help.

@ildyria
Copy link
Member

ildyria commented Jan 24, 2021

  • is it admin owned or user owned album?

  • is it when a user try to access a pw protected admin owned album?

can you have a look at the details of the trace of the error (by enabling APP_DEBUG and looking the response in the network tab) ?

@pchampio
Copy link
Contributor Author

pchampio commented Jan 24, 2021

It's admin owned.
It's when an non-signed-in user try to access a pw public password protected admin owned album.

Yes, forgot about that APP_DEBUG env^^

{
    "message": "SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: \"\" (SQL: select \"_lft\", \"_rgt\" from \"albums\" where \"id\" not in (, 15827567364083, 15822988343846, 15824206426175, 15824220444691, 15824127694605, 15824130376767, 15824229407555, 15827563750904, 15824199906457, 15827206771545, 15824223788065, 15827131834444, 15827210214925, 15827658940226, 15829330871815, 15824712759610, 15827688467115, 15829340269467, 15827687726531, 15824233682465, 15829322943556, 15827657343015, 15829376920322, 15829319032426, 15829321082660, 15829409185988, 15827675185097, 15827677273018, 15827680776701, 15829264422478, 15827669417866, 15901874212500, 15948496609221, 15998491410712, 15829366649660, 15962834681264, 15940610914156, 15983744441886, 15827665885594, 15911770558033, 15937216169032, 15970529356181, 15922131826264, 15843082071835, 16035693573481, 16029311869488, 15824112276570, 16019266249152, 15827545342845, 16041635457899, 15827538925370, 16101225901596) and (\"public\" <> 1 or (\"public\" = 1 and \"viewable\" <> 1) or (\"public\" = 1 and \"password\" <> )))",
    "exception": "Illuminate\\Database\\QueryException",
    "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
    "line": 678,
    "trace": [
        {
            "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
            "line": 638,
            "function": "runQueryCallback",
            "class": "Illuminate\\Database\\Connection",
            "type": "->"
        },
        {
            "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
            "line": 346,
            "function": "run",
            "class": "Illuminate\\Database\\Connection",
            "type": "->"
        },
        {
            "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2313,
            "function": "select",
            "class": "Illuminate\\Database\\Connection",
            "type": "->"
        },
        {
            "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2301,
            "function": "runSelect",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2796,
            "function": "Illuminate\\Database\\Query\\{closure}",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2302,
            "function": "onceWithColumns",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/var/www/html/Lychee/app/Actions/Albums/Extensions/PublicIds.php",
            "line": 91,
            "function": "get",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
       

[....] more log
}

@ildyria
Copy link
Member

ildyria commented Jan 24, 2021

not in (, this is very suspicious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Priority High priority issues
Projects
None yet
Development

No branches or pull requests

2 participants