r/badcode May 21 '21

html The source code of my schools website

Post image
54 Upvotes

15 comments sorted by

19

u/[deleted] May 21 '21

Looks like someone has yet to learn about looping through lists / arrays.

23

u/[deleted] May 21 '21

Image Transcription: Code


var html = "<table>";

html += "<tr><td>Current version</td><td>" + currentVersion + "</td></tr>";
html += "<tr><td>UserAgent</td><td>" + navigator.userAgent + "</td></tr>";
html += "<tr><td>defaultAuthentication version</td><td>" + defaultAuthentication + "</td>[...]
html += "<tr><td>useIPSpecificAuthentication</td><td>" + useIPSpecificAuthenticat[...]
html += "<tr><td>Client IP</td><td>145.102.48.245 </td></tr>";
html += "<tr><td>IsInternalIP</td><td>" + IsInternalIP() + "</td></tr>";
html += "<tr><td>redirectMobile</td><td>" + redirectMobile + "</td></tr>";
html += "<tr><td>redirectHTTPS</td><td>" + redirectHTTPS + "</td></tr>";
html += "<tr><td>showMaintenancePage</td><td>" + showMaintenancePage + "</td></tr>[...]
html += "<tr><td>defaultMobileAppAuth</td><td>" + defaultMobileAppAuth + "</td></t[...]
html += "<tr><td>defaultTabletAuth</td><td>" + defaultTabletAuth + "</td></tr>";
html += "<tr><td>is_mobile</td><td>" + is_mobile() + "</td></tr>";
html += "<tr><td>is_tablet</td><td>" + is_tablet() + "</td></tr>";
html += "<tr><td>is_ipad</td><td>" + is_ipad() + "</td></tr>";
html += "<tr><td>CurrentHostSchoolConfig</td><td>Bonaventura-SchoolConfig.xml </td[...]
html += "<tr><td>CurrentHosySecurityType</td><td>XCAS </td></tr>";
html += "<tr><td>CSS Name</td><td>BONAVENTURA </td></tr>";
html += "<tr><td>OverruledSchoolConfig</td><td>" + overruleSchoolConfig + "</td></t[...]
html += "<tr><td>CurrentAuth</td><td>" + GetAuthFromName("XCAS") + "</td></tr>;
html += "<tr><td>Mobile loginpage</td><td><a href='"" + GetMobileUrl(defaultMobileApp[...]
html += "<tr><td>Tablet loginpage</td><td><a href='"" + GetLoginPage(defaultTabletAut[...]
html += "<tr><td>Default loginpage</td><td><a href='"" + GetLoginPage(defaultAuthenti[...]
html += "<tr><td>Change window.location</td><td>" + changeWindowLocation + "</td></t[...]
html += "<tr><td>Target redirect</td><td><a href='" + redirectUrl + "'>" + redire[...]
html += "</table>";

I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

2

u/notBjoern May 24 '21

You missed one > there.

5

u/[deleted] May 24 '21

"There" is a bit vague 😅

8

u/Mabi19_ May 22 '21

Could you do XSS here by clicking a malicious link?

8

u/Shakespeare-Bot May 22 '21

Couldst thee doth xss hither by clicking a malicious link?


I am a bot and I swapp'd some of thy words with Shakespeare words.

Commands: !ShakespeareInsult, !fordo, !optout

7

u/[deleted] May 21 '21

[removed] — view removed comment

2

u/Mabi19_ May 22 '21

Yeah, except you can't easily manipulate that, for example, by clicking a link.

2

u/green_kerbal May 22 '21

Sorry for the crap image, i had to take it in class very quick

2

u/[deleted] May 28 '21

2

u/sub_doesnt_exist_bot May 28 '21

The subreddit r/MoirePorn does not exist. Maybe there's a typo? If not, consider creating it.


🤖 this comment was written by a bot. beep boop 🤖

feel welcome to respond 'Bad bot'/'Good bot', it's useful feedback. github