• Web Development - WAYWO - #8
    5,514 replies, posted
Quick an dirty solution would be to whack it behind a switch statement so only expected input will produce a valid inclusion, invalid input will default to the home page.
[QUOTE=Tezzanator92;45159255]Quick an dirty solution would be to whack it behind a switch statement so only expected input will produce a valid inclusion, invalid input will default to the home page.[/QUOTE] Still poses a security risk without user data handling.
How so?, I was hinting towards something like this in vague Pseudo-code, effectively sanitizing the input: [code] switch(page) { case "somepage": include somepage; case "someotherpage": include someotherpage; case default: include home; } [/code] I'm not denying this is a shitty way of doing things, I can already think of 2 better ways of doing it simply like this and then there's the full MVC approach. I'm just looking at this one vulnerability rather than the application as a whole. Is there something silly I'm missing?
i thought it's just default: not case default:
Don't they need a break; too?
[QUOTE=Moofy;45160233]Don't they need a break; too?[/QUOTE] no (well yes, i was thinking of default because you replied to me)
[img]http://www.facepunch.com/fp/ratings/winner.png[/img] #1 [t]http://i.imgur.com/Kptet3o.png[/t] [img]http://www.facepunch.com/fp/ratings/heart.png[/img] #2 [t]http://i.imgur.com/cGkQSOE.png[/t] [img]http://www.facepunch.com/fp/ratings/cross.png[/img] Neither
[img]http://www.facepunch.com/fp/ratings/winner.png[/img] is better but still not right imo, on the right track though. try stacking it vertically maybe?
[QUOTE=wizard`;45164613][img]http://www.facepunch.com/fp/ratings/winner.png[/img] is better but still not right imo, on the right track though. try stacking it vertically maybe?[/QUOTE] Yeah I agree that there's something that's not right. Vertical stacking looks kinda worse though. [t]http://i.imgur.com/odha4Nr.png[/t]
Not a fan of the vertical stacking. What if the nav bar is full width across the very top of the page?
Is .cv open for everyone, or is it restricted? I can't manage to find this out myself. dns.cv is very hard to understand, since english isn't available yet, and wikipedia doesn't mention any country restriction.
So I did this for the forums I set up for discussion about [URL="http://comentarinformal.info/flags/index.php"]summer sale teams[/URL]. It's only two users though, and I don't know how to advertise it without spamming it. Rather than having the team scrapper I made for it die alone, [URL="https://gist.github.com/comentarinformal/843aea9e98f33e6bfefb"]I'll just release it here, hoping that it's useful for someone[/URL]. I'm not one of commenting things, so if you have any questions, don't hesitate to ask.
[QUOTE=Jelly;45164764]Yeah I agree that there's something that's not right. Vertical stacking looks kinda worse though. [t]http://i.imgur.com/odha4Nr.png[/t][/QUOTE] make a cooler logo
[QUOTE=ifaux;45170067]make a cooler logo[/QUOTE] Already taken care of [img]http://i.imgur.com/ZjpaQmo.jpg[/img]
[QUOTE=ifaux;45170067]make a cooler logo[/QUOTE] I tried to but they all ended up looking like shit. [editline]21st June 2014[/editline] [QUOTE=KmartSqrl;45166827]Not a fan of the vertical stacking. What if the nav bar is full width across the very top of the page?[/QUOTE] I had that before but I redesigned the page so everything had more breathing room and the full width nav at the top makes the page feel cramped and very bootstrappy. [editline]21st June 2014[/editline] I added another item to the floating right nav and it doesn't look too bad. [t]http://i.imgur.com/5Sox0ei.png[/t]
[QUOTE=xmariusx;45166928]Is .cv open for everyone, or is it restricted? I can't manage to find this out myself. dns.cv is very hard to understand, since english isn't available yet, and wikipedia doesn't mention any country restriction.[/QUOTE] It seems to be [url=http://www.101domain.com/cv.htm]restricted[/url] to companies in Cape Verde.
[t]http://i.imgur.com/HoDqmkg.png[/t] How about that?
[QUOTE=jetboy;45172287][t]http://i.imgur.com/HoDqmkg.png[/t] How about that?[/QUOTE] Maybe... Might look better with the buttons vertically centered too. I'll play around with it, thanks! [editline]a[/editline] [t]http://i.imgur.com/0zDxhRx.png[/t] Maybe? [editline]a[/editline] Or even: [t]http://i.imgur.com/eWMe3xc.png[/t] Ahhh, this is driving me crazy.
the last one is the best so far imo, maybe restrict the float to content width though?
[QUOTE=wizard`;45172999]the last one is the best so far imo, maybe restrict the float to content width though?[/QUOTE] Like this? [t]http://i.imgur.com/bYSqvD9.png[/t]
Have we had this iteration yet? [t]http://imgur.com/umargLw.png[/t] {Ignore the rough spacing, was done by eye)
That looks good too. Damn, there are so many iterations and possibilities. Thanks everyone for the suggestions!
[QUOTE=Aksami0;45156136]I always thought that the firefox is my friend, now many years together with the firefox he decided to betray me :suicide: in firefox [IMG]http://puu.sh/9ACSR/397cfb99e2.png[/IMG] in chrome [IMG]http://puu.sh/9ACRv/3065ee3a78.png[/IMG][/QUOTE] This is probably more to do with your code
Just some food for thought. [t]http://i.imgur.com/fWfR64q.png[/t] [t]http://i.imgur.com/s6ldAJN.png[/t]
[QUOTE=TrinityX;45174190][t]http://i.imgur.com/fWfR64q.png[/t][/QUOTE] this looks neat but the buttons aren't really obvious at all
[QUOTE=TrinityX;45174190]Just some food for thought. [t]http://i.imgur.com/s6ldAJN.png[/t][/QUOTE] The first thing that came to mind [t]http://i.imgur.com/QbWsngJ.gif[/t] ...come to think about it, that would be a cool easter egg. Elements of a page being used for a quick tetris.
I'm going to be adding the option to my cManager to use MySQL or a local database, does anyone have any suggestions? I've been looking at SQLite but I wanted to hear what you guys think.
[QUOTE=Coment;45174317]...come to think about it, that would be a cool easter egg. Elements of a page being used for a quick tetris.[/QUOTE] Do it, that'd be awesome
[QUOTE=_RJ_;45174661]I'm going to be adding the option to my cManager to use MySQL or a local database, does anyone have any suggestions? I've been looking at SQLite but I wanted to hear what you guys think.[/QUOTE] SQLite3 would be a great thing to implement support for, because if nothing else then it's great for doing local testing and development, as it allows you to VERY easily set up a development environment without having to run massive servers or install a lot of shit you don't want on your local machine. You can, in many cases, simply dump the code in any kind of PHP-compliant server, and be done with it. Fucking shit is amazing. It even works for the main database if you're doing things right.
How did you get that json syntax highlighting in chrome?
Sorry, you need to Log In to post a reply to this thread.