HDInnovations / UNIT3D-Community-Edition

Private Torrent Tracker Built With Laravel, Livewire and AlpineJS.
GNU Affero General Public License v3.0
1.98k stars 379 forks source link

[Bug] 500 error when uploading NFO #1571

Closed napzter13 closed 3 years ago

napzter13 commented 3 years ago

Describe the bug When uploading a NFO file under Torrent Upload page, an error 500 is returned.

To Reproduce Steps to reproduce the behavior:

  1. Go to Torrent upload page
  2. Click on upload NFO
  3. FIll torrent stuff
  4. Press Upload.
  5. See error 500

Screenshot If applicable, add screenshots to help explain your problem. image

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\x92ve ta...' for column 'nfo' at row 1 (SQL: insert into torrents (name, slug, description, mediainfo, info_hash, file_name, num_file, announce, size, nfo, category_id, type_id, resolution_id, user_id, imdb, tvdb, tmdb, mal, igdb, anon, stream, sd, internal, moderated_at, moderated_by, free, updated_at, created_at) values (Microsoft Visual Studio 2019.16.6.3 Offline-installer, microsoft-visual-studio-20191663-offline-installer, Full offline installer of Visual Studio 2019 Enterprise v. 16.6.3 direct form Microsoft.

Stack error:

[2021-01-05 12:43:05] prod.ERROR: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xDC\xDC\xDC\xDC\xDC\xDC...' for column 'nfo' at row 1 (SQL: insert into torrents (name, slug, description, mediainfo, info_hash, file_name, num_file, announce, size, nfo, category_id, type_id, resolution_id, user_id, imdb, tvdb, tmdb, mal, igdb, anon, stream, sd, internal, moderated_at, moderated_by, free, updated_at, created_at) values (Cyber-CODEX, cyber-codex, ., ?, b100ae56d5b2849eb07828ab65407d2b, 5ff450c9e016.torrent, 7, http://WEBSITE.com/announce/PID, 598908, ÜÜÜÜÜÜÜ ÜÜÜ ÜÜ ......... at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:678)

[stacktrace]

0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()

1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(472): Illuminate\Database\Connection->run()

2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(424): Illuminate\Database\Connection->statement()

3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert()

4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2872): Illuminate\Database\Query\Processors\Processor->processInsertGetId()

5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1508): Illuminate\Database\Query\Builder->insertGetId()

6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1051): Illuminate\Database\Eloquent\Builder->__call()

7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1016): Illuminate\Database\Eloquent\Model->insertAndSetId()

8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(857): Illuminate\Database\Eloquent\Model->performInsert()

9 /var/www/html/app/Http/Controllers/TorrentController.php(1328): Illuminate\Database\Eloquent\Model->save()

10 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\TorrentController->upload()

github-actions[bot] commented 3 years ago

Thank you for submitting your first issue. Please make sure it follows our Issue Template and you have provided all information.' first issue

HDVinnie commented 3 years ago

On demo site. Will push fix to master tonight sometime.

Image from Gyazo