![]() |
[REQ] Replace special characters on mkdir
When a user mkdir with special characters, a script replaces the character special:
& = And space = _ ? = _ ' = deleted etc. |
This is a script request, therefore it belongs in the Scripting - Requests category. I suggest you read the forum rules, since you seem to have a hard time following them.
http://www.ioftpd.com/board/announce...p?s=&forumid=2 Thread moved and renamed. |
hey iam,
there's a few problems with your script request: 1) if a user makes the folder and then a script tries to modify it (by renaming & -> And ...etc) it will fail because the user is still in that folder 2) the only method I could think of was to tell the user that the mkdir failed, then mkdir with the renamed syntax. Like: MKDIR /apps/My Hate's You!! 550 Command Failed ... then script makes /apps/My_Hates_You!! in the background 2 problems with this 1) the user won't know that it was created until he lists directory again 2) most ftp clients will tell the user that mkdir has failed and the queue item will have failed, therefore the rest of the files will not be transferred. The best way to go about this is just deny paths with characters that you want removed or renamed and send the user a message: "& is not an allowed character" |
hmm i though d1 had a command to change the current pwd of the user usoing one of those ! things...
I guess u can make the new folder, DONT delete the old one, but make it into a symlink then delete l8r ?? or something blah! too complicated, i quit. |
what about:
- script creates the "translated" directory itself - script outputs "200 MKDIR ok." - script returns nonzero value => ioFTPD does nothing. ? |
The best way to go about this is just deny paths with characters that you want removed or renamed and send the user a message:
"& is not an allowed character" => yes with a zipscript denied But not best the solution request script impossible to make ? blah! too complicated, i quit. => LoL |
Cant a script just make "test_space" when it gets a mkdir "test space"
And if the client sends a cwd to "test space" script auto changes it to "test_space" so the cwd will work anywayz.. Believe gl does it like this (didnt test though :P ) |
jesus guys, ur all thicko or what? :P
[pre] mkd = TCL ..\scripts\mkdir.itcl Code:
set banned { |
not working
MKD tes?t and nothing to be created |
Code:
set chmod 755 |
bahg, fukit, cant return ioerror 1, or args as io freezes, GREAT!
|
bizniz your script it does not replace, it stop
You cannot make for replaces auto ? |
Quote:
|
Quote:
|
not working bizniz, freeze on mkdir
|
All times are GMT -5. The time now is 03:12 AM. |
Powered by vBulletin® Version 3.8.11 Alpha 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)