Customize the name of the API handler (the ws.php script) #789

Closed
opened 2026-10-05 00:17:25 +02:00 by adam · 2 comments
Owner

The ws.php file is a target for cross-scripting attacks, I can rename it to hide it from attackers (of course I need to update which I use to access it). However, this breaks the admin interface as there are multiple places Piwigo's code where the ws.php name is hard-coded.

Could you implement an option, which would provide a way for users to rename the script and use a custom name without having to go through a dozen of source files?

The ws.php file is a target for cross-scripting attacks, I can rename it to hide it from attackers (of course I need to update which I use to access it). However, this breaks the admin interface as there are multiple places Piwigo's code where the ws.php name is hard-coded. Could you implement an option, which would provide a way for users to rename the script and use a custom name without having to go through a dozen of source files? <!-- github-sync-id:328850050 -->
adam closed this issue 2026-10-05 00:17:26 +02:00
Author
Owner

So are admin.php or identification.php. I'm not convinced the solution is to rename ws.php into ws1234.php.

@modus75 what do you think?

So are admin.php or identification.php. I'm not convinced the solution is to rename ws.php into ws1234.php. @modus75 what do you think? <!-- github-comment-id:394270250 -->
Author
Owner

I'm not sure this is a solution. The api is used on the public side for rating (maybe some other things). So it would be easy for an attacker to find it.

I'm not sure this is a solution. The api is used on the public side for rating (maybe some other things). So it would be easy for an attacker to find it. <!-- github-comment-id:394272273 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#789