• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Forwarded to devs Hotlink protection CLI - Multiple entries issue

Hex

Regular Pleskian
Plesk Certified Professional
User name: Hextrator

TITLE

Hotlink protection CLI - Multiple entries issue

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian on CentOS7

PROBLEM DESCRIPTION

As per the following command on Linux:
Bash:
plesk bin hotlink_protection --help

This command is unable to include multiple file extensions
Bash:
plesk bin hotlink_protection --update <domain|subdomain> -protected-extensions <ext1;ext2;...>
Example: If hotlink protection is enabled for a domain, all picture file extensions are protected by default:

Bash:
plesk bin hotlink_protection -i <domain|subdomain>
enabled=true
friendly-domains=
protected-extensions=bmp;dib;rle;emf;wmf;gif;jpg;jpeg;jpe;jif;jfif;pcx;png;tga;tiff;tif

If you want to protect all pic files extensions from hotlinking except let say: PNG and GIF only:

Bash:
plesk bin hotlink_protection --update example.com -protected-extensions bmp;dib;rle;emf;wmf;jpg;jpeg;jpe;jif;jfif;pcx;tga;tiff;tif

The command will only accept the first param <png;> and ignore the rest.

STEPS TO REPRODUCE

Exclude PNG and GIF from hotlinking for the domain example.com

Bash:
plesk bin hotlink_protection --update example.com -protected-extensions bmp;dib;rle;emf;wmf;jpg;jpeg;jpe;jif;jfif;pcx;tga;tiff;tif

ACTUAL RESULT

Bash:
[root@centos]# plesk bin hotlink_protection --update example.com -protected-extensions bmp;dib;rle;emf;wmf;jpg;jpeg;jpe;jif;jfif;pcx;tga;tiff;tif
bash: dib: command not found
bash: rle: command not found
bash: emf: command not found
bash: wmf: command not found
bash: jpg: command not found
bash: jpeg: command not found
bash: jpe: command not found
bash: jif: command not found
bash: jfif: command not found
bash: pcx: command not found
bash: tga: command not found
bash: tiff: command not found
bash: tif: command not found

And the only accepted ext is the first param bmp;

Bash:
[root@centos]# plesk bin hotlink_protection -i example.com
enabled=true
friendly-domains=
protected-extensions=bmp
enabled=true
friendly-domains=
protected-extensions=bmp

EXPECTED RESULT

Bash:
plesk bin hotlink_protection -i example.com
enabled=true
friendly-domains=
protected-extensions=bmp;dib;rle;emf;wmf;jpg;jpeg;jpe;jif;jfif;pcx;tga;tiff;tif

All are protected except PNG and GIF.

ANY ADDITIONAL INFORMATION

Example use case:

Source info:


I'm not sure why is not documented for Linux.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Last edited:
Back
Top