Novik / ruTorrent

Yet another web front-end for rTorrent
Other
2.01k stars 408 forks source link

ctype_xdigit error on entware rtorrent-easy-install package #2553

Open OverKilL013 opened 1 year ago

OverKilL013 commented 1 year ago

Please complete the following tasks.

Tell us about your environment

FF: 116.0.2 ruTorrent: 4.1.5 php: 8.2.6 os: asus merlin + entware at asus ax92u router

Tell us how you installed ruTorrent

entware opkg rtorrent-easy-install

Describe the bug

after installatuion the plugin when i try to change direction of torrent file nothing was happend

Steps to reproduce

click on torrent select menu "save to" select path click "ok" see still screen and waiting for nothing

Expected behavior

the file must be replaced to another directory and i would see the result in webui

Additional context

I check the log file with enabled debug the problrm was in action.php at line 36 the function ctype_xdigit was undefined

so I had replaced if( !ctype_xdigit($hash)) with if(!preg_match('/^[0-9a-f]{40}$/i', $hash)) and all return to work

stickz commented 1 year ago

Feel free to submit a pull request toward v4.2 branch. You can call function_exists("ctype_xdigit"). If it doesn't exist, you can use preg_match instead. I don't have a problem with adding support for different platforms. v4.1 is done, after the next hotfix.

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.