Jump to content

Newest Change Breaks Everything


cutler121

Recommended Posts

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

Link to comment
Share on other sites

[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

Link to comment
Share on other sites

  • Root Admin

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 by Chewett
added code tags Smart forum converted it into C...
Link to comment
Share on other sites

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 :P

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 :P

Link to comment
Share on other sites

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 by I am Bored
Link to comment
Share on other sites

  • Root Admin

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.

Link to comment
Share on other sites

[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

Link to comment
Share on other sites

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 :P

Link to comment
Share on other sites

[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 :D
[/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 by I am Bored
Link to comment
Share on other sites

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'] :D

Anyway, I find it easiest to use chr()

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Forum Statistics

    17.5k
    Total Topics
    182.5k
    Total Posts
  • Recently Browsing

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...