cutler121 Posted November 8, 2009 Report Posted November 8, 2009 The inability to print upper case letters from the MD script makes it impossible to load external sites with capitalized letters. The only way I could get my scripts to load was to have them load from the default @content[0] section. Now that this has to be echoed as well all of my scripts are broken. Mur, can you get rid of the making everything lowercase it doesn't make anything more secure. Cutler Fenrir Greycloth and Watcher 1 1 Quote
Root Admin Chewett Posted November 8, 2009 Root Admin Report Posted November 8, 2009 do you mean loading stuff like webpages or something? because last time i checked everything on the internet was case insensitive (case doesn't matter) what are you trying to do where the case matters? Quote
cutler121 Posted November 8, 2009 Author Report Posted November 8, 2009 [quote name='Chewett' date='08 November 2009 - 09:58 AM' timestamp='1257674333' post='46932'] do you mean loading stuff like webpages or something? because last time i checked everything on the internet was case insensitive (case doesn't matter) what are you trying to do where the case matters? [/quote] Actually that isn't correct at all. There are many case sensitive html locations. For example <a href="http://www.the-cript.com/cutler/Loader2.htm">Puzzle Arcade 1</a> <a href="http://www.the-cript.com/Cutler/Loader2.htm">Puzzle Arcade 2</a> Note the only difference is the capitalized C in my name. Case insensitivity is not a general property of the internet. Cutler Quote
Root Admin Chewett Posted November 8, 2009 Root Admin Report Posted November 8, 2009 (edited) wow, thats intresting, Must be an apache property, thats very intresting. i learnt something today. This does break things [code]& # 6 7 ; remove the spaces on the above code or forum converts it [/code] does using this special html char work? i would check, but ofc no mdscript access.... Edited November 8, 2009 by Chewett added code tags Smart forum converted it into C... Quote
Rendril Posted November 8, 2009 Report Posted November 8, 2009 It's a security precaution that unforunately forces the script to be lower-cased. There are simple workarounds you can do, and the best one I suggest is jsut rename the Loader2.html Anyway, you can get around the lower-casing in many ways. chr() Will output a capital letter given the right code. You could use strtoupper() Or write yoru own function to make it shorter [code]function u(@temp){ (prepare function) return strtoupper(@temp); }[/code] That way you call upper case just by using u() In the extreme cases use chr(int - 32), though it would be less portable. And another extreme example is seperate the content sections into letters, and call the url as [code] @temp = '<a href="http://www.the-cript.com/cutler/' . @content[1] . 'oader2.htm">' . @content[2] . 'uzzle ' . @content[3] .'rcade 1</a>'; [/code] Don't do the above example if you value your [color="#FFFFFF"]in[/color]sanity Quote
Rendril Posted November 8, 2009 Report Posted November 8, 2009 I hope you don't plan on writing the uppercase alphabet into the content section... Quote
I am Bored Posted November 8, 2009 Report Posted November 8, 2009 (edited) i might... i did.... here: [code] <!-- content separator --> A <!-- content separator --> B <!-- content separator --> C <!-- content separator --> D <!-- content separator --> E <!-- content separator --> F <!-- content separator --> G <!-- content separator --> H <!-- content separator --> I <!-- content separator --> J <!-- content separator --> K <!-- content separator --> L <!-- content separator --> M <!-- content separator --> N <!-- content separator --> O <!-- content separator --> P <!-- content separator --> Q <!-- content separator --> R <!-- content separator --> S <!-- content separator --> T <!-- content separator --> U <!-- content separator --> V <!-- content separator --> W <!-- content separator --> X <!-- content separator --> Y <!-- content separator --> Z[/code] just refer to the content section you want, i would advise putting those at the top. Edited November 8, 2009 by I am Bored Quote
Rendril Posted November 8, 2009 Report Posted November 8, 2009 I don't think that would work, since there are line breaks Quote
Root Admin Muratus del Mur Posted November 8, 2009 Root Admin Report Posted November 8, 2009 it doeas make things more secure by covering more check situations. I will document it better because right not its written nowhere about it. I might have a way to change it (using lowercase just for the checks and revert strings for actual run) ps: no, case insensite comparison does not work here. Quote
cutler121 Posted November 9, 2009 Author Report Posted November 9, 2009 [quote name='Muratus del Mur' date='08 November 2009 - 07:20 PM' timestamp='1257708041' post='46993'] it doeas make things more secure by covering more check situations. I will document it better because right not its written nowhere about it. I might have a way to change it (using lowercase just for the checks and revert strings for actual run) ps: no, case insensite comparison does not work here. [/quote] Exactly, making it so only lowercase letters can be output doesn't allow you to cover more check situations, that can be done either way. If you convert the strings to lowercase when you do your check then it is the same result with no added difficulties for the people trying to use the MDscripting. Your checks can still be done identically. Having to kludge together workarounds for arbitrary stuff like this just gets in the way of making nice things for MD. Cutler Chewett and Watcher 1 1 Quote
Rendril Posted November 9, 2009 Report Posted November 9, 2009 Lower casing the script provided better security the way the protection worked before. Right now it has very little security effect because of everything being blocked anyway. And Cutler, isn't kludging workarounds the best part of coding Quote
I am Bored Posted November 9, 2009 Report Posted November 9, 2009 (edited) [quote name='Rendril' date='08 November 2009 - 12:47 PM' timestamp='1257706072' post='46988'] I don't think that would work, since there are line breaks [/quote] oh alright then, here: [code]<!-- content separator -->A<!-- content separator -->B<!-- content separator -->C<!-- content separator -->D<!-- content separator -->E<!-- content separator -->F<!-- content separator -->G<!-- content separator -->H<!-- content separator -->I<!-- content separator -->J<!-- content separator -->K<!-- content separator -->L<!-- content separator -->M<!-- content separator -->N<!-- content separator -->O<!-- content separator -->P<!-- content separator -->Q<!-- content separator -->R<!-- content separator -->S<!-- content separator -->T<!-- content separator -->U<!-- content separator -->V<!-- content separator -->W<!-- content separator -->X<!-- content separator -->Y<!-- content separator -->Z[/code] Edited November 9, 2009 by I am Bored Quote
Rendril Posted November 9, 2009 Report Posted November 9, 2009 Now that I think about it, you could juse a single content section to store the whole upprcase alphabet and use the string content as the array of characters it is. ie: [code]echo @content[0][1];[/code] If you really feel like it, make an assocative array so you can call it by @va['a'] Anyway, I find it easiest to use chr() Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.