XSS, files.livedrive.com, GHDB DORK REPORT SUMMARY

Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

XSS Home | XSS Crawler | SQLi Crawler | HTTPi Crawler | FI Crawler |

Private Reporting of Security Research is preferred for Online Service Providers



Loading

Netsparker - Scan Report Summary
TARGET URL
http://files.livedrive.com/portal/resetpasswo...
SCAN DATE
6/23/2011 8:55:52 PM
REPORT DATE
6/24/2011 5:22:48 AM
SCAN DURATION
00:03:45

Total Requests

Average Speed

req/sec.
14
identified
10
confirmed
0
critical
5
informational

SCAN SETTINGS

Scan Settings
PROFILE
Previous Settings
ENABLED ENGINES
Static Tests, Find Backup Files, Blind Command Injection, Blind SQL Injection, Boolean SQL Injection, Command Injection, HTTP Header Injection, Local File Inclusion, Open Redirection, Remote Code Evaluation, Remote File Inclusion, SQL Injection, Cross-site Scripting
Authentication
Scheduled

VULNERABILITIES

Vulnerabilities
Netsparker - Web Application Security Scanner
IMPORTANT
14 %
MEDIUM
14 %
LOW
36 %
INFORMATION
36 %

VULNERABILITY SUMMARY

Vulnerability Summary
URL Parameter Method Vulnerability Confirmed
/crossdomain.xml Open Policy Crossdomain.xml Identified Yes
/portal/ Cookie Not Marked As HttpOnly Yes
/portal/js.php PHP Version Disclosure No
E-mail Address Disclosure No
/portal/Login/ diverturl POST Open Redirection Yes
diverturl POST Internal Server Error Yes
/portal/musicplayer.php id GET Cross-site Scripting Yes
/portal/resetpassword Password Transmitted Over HTTP Yes
Auto Complete Enabled Yes
/portal/static/ Forbidden Resource Yes
/portal/Uploader.php Redirect Response BODY Is Too Large Yes
/webservice/ File Upload Functionality Identified Yes
/webservice/AjaxHandler.ashx ASP.NET Version Disclosure No
IIS Version Disclosure No
Cross-site Scripting

Cross-site Scripting

1 TOTAL
IMPORTANT
CONFIRMED
1
XSS (Cross-site Scripting) allows an attacker to execute a dynamic script (Javascript, VbScript) in the context of the application. This allows several different attack opportunities, mostly hijacking the current session of the user or changing the look of the page by changing the HTML on the fly to steal the user's credentials. This happens because the input entered by a user has been interpreted as HTML/Javascript/VbScript by the browser.

XSS targets the users of the application instead of the server. Although this is a limitation, since it allows attackers to hijack other users' session, an attacker might attack an administrator to gain full control over the application.

Impact

There are many different attacks that can be leveraged through the use of XSS, including:

Remedy

The issue occurs because the browser interprets the input as active HTML, Javascript or VbScript. To avoid this, all input and output from the application should be filtered. Output should be filtered according to the output format and location. Typically the output location is HTML. Where the output is HTML ensure that all active content is removed prior to its presentation to the server.

Prior to sanitizing user input, ensure you have a pre-defined list of both expected and acceptable characters with which you populate a white-list. This list needs only be defined once and should be used to sanitize and validate all subsequent input.

There are a number of pre-defined, well structured white-list libraries available for many different environments, good examples of these include, OWASP Reform and Microsoft Anti Cross-site Scripting libraries are good examples.

Remedy References

External References

- /portal/musicplayer.php

/portal/musicplayer.php CONFIRMED

http://files.livedrive.com/portal/musicplayer.php?id='%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ea..

Parameters

Parameter Type Value
id GET '"--></style></script><script>alert(0x0001F9)</script>

Request

GET /portal/musicplayer.php?id='%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x0001F9)%3C/script%3E HTTP/1.1
Referer: http://files.livedrive.com/portal/js.php?file=common.js&lang=en
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=cjkuuo79ndlkbuvgreuk65ok25; AddOn=flash
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
X-Served-By: 103
Date: Fri, 24 Jun 2011 01:57:11 GMT
Connection: close
Content-Length: 9103


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">

<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="http://files.livedrive.com/portal/static/css/screen.css" />
<script type="text/javascript"> document.domain = "livedrive.com";</script>
<script type="text/javascript" src="http://files.livedrive.com/portal/static/js/swfobject.js" ></script>

<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=combine&group=prototype&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=common.js&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=combine&group=swfupload&lang=en" ></script>

</head>
<body style="overflow:hidden;">
<!-- toolbar status windows -->
<div id="tbMP" style="width:300px; height:300px; " >
<div class="tbStatusHead">
<span>Music Player</span>
</div>

<div id="tbMPCTArtwork" style="float:left;width:70px; height:70px; margin-top:10px; margin-bottom:5px; margin-left:10px;">
<img id="tbMPCTArtworkImg" src="/portal/static/images/1x1.gif" width="70" height="70"/>
</div>
<div id="tbMPCurrentTrack" style="overflow:hidden;text-align:left;float:left;width:180px; margin-top:10px; margin-bottom:5px;">&nbsp;</div>
<div style="clear:both;"></div>
<div id="tbMPControls">
<span id="tbMPClear" onclick="document.flashMp3Player.clearPlaylist();"><img src="/portal/static/images/musicplayer/clearplaylist.png" /></span>
<span id="tbMPPrev" onclick="document.flashMp3Player.prevTrack();"><img src="/portal/static/images/musicplayer/previous.png" width="67" height="20" alt="Previous" /></span>
<span id="tbMPPlay" onclick="document.flashMp3Player.playTrack();"><img id="tbMPPlayImg" src="/portal/static/images/musicplayer/play.png" width="68" height="20" alt="Play" /></span>
<span id="tbMPNext" onclick="document.flashMp3Player.nextTrack();"><img src="/portal/static/images/musicplayer/forward.png" width="67" height="20" alt="Forward" /></span>
</div>
<div id="tbMPPlaylist" style="height: 149px; overflow-y:scroll;"></div>
</div>


<div id="ldbar">

<div class="ldbar-musicplayer">
<div class="ldbar-innerbtn">
<span style="font-weight:normal" class="ldbar-txtlink">Music Player</span>
</div>
<div id="flashMp3Player"></div>
</div>
</div>




<script type="text/javascript" defer="defer">


/*** music player functions ***/
var flashvars = {
skin_url: '/portal/static/swf/ldbar-musicskin/',
autoplay: true
}

var params = {
base: ".",
quality: "best",
allowfullscreen: "true",
wmode:"transparent"
}

var attributes = {
wmode:"transparent"
}

swfobject.embedSWF("/portal/static/swf/mp3player.swf?playlist_url=/portal/file/callback.php?method=mp3Playlist%26ParentId=NONE", "flashMp3Player", "65", "20", "9.0.0", false, flashvars, params, attributes);

var flash = false;


</script>


<script type="text/javascript">


mpState = Cookie.get('musicplayerState');

if (mpState=='maximized')
{
$('tbMP').setStyle({bottom:"0px", visibility:"visible", position: "fixed" });
$('mpPinImg').src = '/portal/static/images/pin-on.png';
mpUpdate = true;
callUpdateMusicPlayer();
}



/* toolbar functions */
var fileSpeedStats = {};
var flashPres = true;
var Playing = 0;
var PlayingID = '';
var CurrentArtist ='';
var CurrentTitle = '';
var CurrentAlbum = '';


/**
* Displays the music player.
*/



// controls when to update music player
var mpUpdate = false;

/**
* Similar in function to the uploader, this method updates the music player
* every second to repaint.
*/



function mpStateChange(state)
{
switch (state)
{
case 'close' :
document.flashMp3Player.stopTrack();
Cookie.set('musicplayerState','minimized');
mpUpdate = false;
break;
case 'minimize' :
Cookie.set('musicplayerState','minimized');
mpUpdate = false; // stop the updater loop
break;
}
}


/**
* Renders the currently playing track and the playlist queue.
*/
function updateTBMP() {
if(!flashPres) {
if($('tbMPCurrentTrack'))$('tbMPCurrentTrack').innerHTML='<span>Install Flash to play Music</span>';
return;
}
try {
currentTrackStr = document.flashMp3Player.getJSCurrentTrack();

if(currentTrackStr!='' && currentTrackStr!='[]') {
currentTrack = currentTrackStr.evalJSON(true);

if(currentTrack.ID!=undefined && PlayingID != currentTrack.ID) { // playing track has changed
PlayingID = currentTrack.ID;

$('tbMPCTArtworkImg').src="/webservice/AjaxHandler.ashx?Type=Query&Method=GetThumbnail&ID="+PlayingID+"&Backup="+backupFlag;

new Ajax.Request("/webservice/AjaxHandler.ashx", {
parameters: { method: 'GetID3Data', ID: PlayingID, Backup:backupFlag },
method: 'post',
onSuccess: function(transport) {
id3data = transport.responseText.evalJSON();
CurrentArtist=id3data.Artist;
CurrentTitle=id3data.Title;
CurrentAlbum=id3data.Album;
//console.log(id3data.Artist)
}
});
}

if(currentTrack.Playing!=undefined && Playing != currentTrack.Playing) { // playing mode has changed
Playing = currentTrack.Playing;
//console.log(Playing);
if(Playing == '2')
$('tbMPPlayImg').src= "/portal/static/images/musicplayer/pause.png";
else
$('tbMPPlayImg').src = "/portal/static/images/musicplayer/play.png";
}

if($('tbMPCurrentTrack')) {
trackInfo='';
if(CurrentTitle!=undefined && CurrentTitle!='') trackInfo+='<div style="width:185px; height: 14px; overflow:hidden;" title="'+CurrentTitle+'">'+CurrentTitle+'</div>';
if(CurrentArtist!=undefined && CurrentArtist!='') trackInfo+='<div style="width:185px; height: 14px; overflow:hidden;" title="'+CurrentArtist+'">'+CurrentArtist+'</div>';
if(CurrentAlbum!=undefined && CurrentAlbum!='') trackInfo+='<div style="width:185px; height: 14px; overflow:hidden;" title="'+CurrentAlbum+'">'+CurrentAlbum+'</div>';
if(trackInfo=='')trackInfo='<span>'+currentTrack.Title+'</span><br/>';
$('tbMPCurrentTrack').innerHTML=trackInfo+'<span>'+currentTrack.playPositionSec+'</span>';
}
}
else {
if($('tbMPCurrentTrack'))$('tbMPCurrentTrack').innerHTML='<span>' + localize('No Songs') + '</span>';
}

playlistStr = document.flashMp3Player.getJSPlaylist();
if(playlistStr!='' && playlistStr!='[]' ) {
playlist = playlistStr.evalJSON(true);
playlistText='';
playlist.each(function(song, index) {
songClass="songOdd";
if(index%2==0) songClass="songEven";
if(currentTrack.Title==song.Title) {
songClass+=" songPlaying";
}
playlistText+='<span class="'+songClass+'" onclick="document.flashMp3Player.gotoTrack('+(index+1)+');">'+pad(index,2)+' '+song.Title+'</span>';
});

$('tbMPPlaylist').innerHTML=playlistText;
}
else {
$('tbMPPlaylist').innerHTML='<span></span>';
$('tbMPCTArtworkImg').src="/portal/static/images/1x1.gif";
}
}
catch (e) {
//console.log(e);
}
}




function pad(n, len) {

s = n.toString();
if (s.length < len) {
s = ('0000000000' + n.toString()).slice(-len);
}

return s;
}

/**
* Ran after the document has loaded to register the ability to drag files onto the music
* player.
*/
document.observe("dom:loaded",
function() {
try {
if(!Plugin.isInstalled('Flash')) {
flashPres=false;
}
else {
flashPres=true;
}

//register DnD target
Droppables.add($('tbMP'), {hoverclass: 'nodeDrop', onDrop: function QueueFile( drag,drop){
Effect.Fade(drag);
itemId=drag.id.replace("node_","");
fd.QueueMp3(itemId);
}
});

// disable things if not available
updateUploadStatus();
}
catch(ex) {}
}
);

function notifyOpener() {
if(self.opener || !self.opener.musicPlayer) self.opener.musicPlayer = self;
updateTBMP();

}
setInterval( notifyOpener, 200 );
self.focus();
function handleError() { return true; }
window.onerror = handleError;



function queueTrack() {
var id = "'"--></style></script><script>netsparker(0x0001F9)</script>";
var url = "";
var name = "";
self.opener.fd.QueueSingleMp3(id, url, name);
clearInterval(startupinterval);
}
var startupinterval = setInterval(queueTrack,500);



</script>

</body>
</html>
Password Transmitted Over HTTP

Password Transmitted Over HTTP

1 TOTAL
IMPORTANT
CONFIRMED
1
Netsparker identified that password data is sent over HTTP.

Impact

If an attacker can intercept network traffic he/she can steal users credentials.

Actions to Take

  1. See the remedy for solution.
  2. Move all of your critical forms and pages to HTTPS and do not serve them over HTTP.

Remedy

All sensitive data should be transferred over HTTPS rather than HTTP. Forms should be served over HTTPS. All aspects of the application that accept user input starting from the login process should only be served over HTTPS.
- /portal/resetpassword

/portal/resetpassword CONFIRMED

http://files.livedrive.com/portal/resetpassword

Form target action

http://files.livedrive.com/portal/Login/

Request

POST /portal/resetpassword HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7; AddOn=flash
Content-Length: 29
Accept-Encoding: gzip, deflate

emailAddress=&_submit_check=1

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"
X-Served-By: 103
Date: Fri, 24 Jun 2011 01:55:56 GMT
Connection: close
Content-Length: 5507


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" />



<meta name=”ROBOTS” CONTENT=”NOINDEX,NOFOLLOW”>
<link rel="stylesheet" href="http://files.livedrive.com/portal/static/css/dtree.css" type="text/css" media="screen" />
<link rel="icon" type="image/png" href="/portal/favicon.png" />
<link rel="stylesheet" type="text/css" href="http://files.livedrive.com/portal/static/css/screen.css?ver=1.1" />
<style type="text/css">body {overflow:auto;}</style>


<script type="text/javascript"> document.domain = "livedrive.com"; </script>

<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=combine&group=prototype&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=common.js&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=main.js&lang=en" ></script>

<script type="text/javascript" src="http://files.livedrive.com/portal/static/js/swfobject.js" ></script>




<title>
Reset password | Livedrive</title>
<script language="javascript" type="text/javascript">
if (self != top) {
top.document.title = document.title
}</script>

</head>
<body>
<div id="mainContainer">
<div id="header-container" style="height:74px;">





<div id="HeaderFade"></div>
<div id="HeaderShadowLeft"></div>
<div id="header" >



<div id="user-login-info" >
<form target="_top" action="http://files.livedrive.com/portal/Login/" method="post">
<input type="hidden" name="lang" id="lang" value="en"/><input type="hidden" name="filemethod" value="start" /><input type="hidden" name="diverturl" id="diverturl" value="http://files.livedrive.com/portal/"/>Username<input type="text" name="ctlUsername" id="username" value=""/>Password<input type="password" name="ctlPassword" id="password" /><input type="submit" value="Login" /><br/></form> </div>





<div id="logo-container"><a href="http://www.livedrive.com/" target="_blank"><img src="http://files.livedrive.com/portal/static/images/livedrive-logo.png" alt="logo" /></a></div> </div>
<div id="HeaderShadowRight"></div>






<div id="no-navigation-container">
<div id="no-navigation-left"></div>
<div id="no-navigation-right"></div>
</div>
</div>

<!-- end: header -->


<div class="outer">


<div id="breadcrumbs-container">
<a id="breadcrumb-home" href="/portal">
<img src="/portal/static/images/header/breadcrumb-home.png">

</a>
<div class="breadcrumb-seperator"></div>


<div class="breadcrumb-item">Settings</div><div class="breadcrumb-seperator"></div>


</div> <!-- end: breadcrumbs-container -->



<div id="PublicBusinessSharingHolder"></div>


<div id="centrecontent" class="settings-content">
<div id="floatwrap" class="float-wrap">
<div id="content" >

<div class="contentWrap">

<div class="portalContent" >


<form method="post" action="">

<h1>Reset password</h1>
<p>Enter the email address you registered with livedrive to reset your account password</p><br/>

<div class="msg-box-red"><p>Please enter an email address.</p></div>
<div class="form-row">
<div class="form-label"><label for="password">Email</label></div>
<div class="form-input">
<input type="text" name="emailAddress" id="emailAddress" class="textinput" value="" /><br /><br />
<input type="hidden" name="_submit_check" value="1"/>
<input type="submit" value="Reset password" class="buttonlink" />
</div>
</div>

</form>


</div> </div>

</div> <!-- end: content -->
<!-- end centered div -->


</div> <!-- end: float-wrap class -->




<div class="clearboth"></div>
<br/>
</div> <!-- end: inner -->
</div> <!-- end: outer -->
</div> <!-- end: mainContainer -->
<div id="Footer">
<p>&copy; 2005 - 2011 Livedrive Internet Ltd | All Rights Reserved | Prices include local taxes unless otherwise stated | <a href="/privacy-policy">Privacy Policy</a> | <a href="/terms-of-use">Terms of Service</a></p>
<p id="CompanyInfo">
Company registration No. 05435857. Registered in England and Wales. VAT No. 879 3921 65.<br/>
Registered office: 1 Kingdom Street, Paddington, London, W2 6BD.</p>
</div>






<script type="text/javascript">


/*** toolbar functions ***/

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-3224643-1");
pageTracker._setDomainName("livedrive.com");
pageTracker._trackPageview();
} catch(err) {}
</script>

</body>
</html>
Open Policy Crossdomain.xml Identified

Open Policy Crossdomain.xml Identified

1 TOTAL
MEDIUM
CONFIRMED
1
Netsparker identified Open Policy Crossdomain.xml file.

Impact

Open Policy Crossdomain.xml file allows other SWF files to make HTTP requests to your web server and see its response. This can be used for accessing one time tokens and CSRF nonces to bypass CSRF restrictions.

Remedy

Configure your Crossdomain.xml to prevent access from everywhere to your domain.

External References

- /crossdomain.xml

/crossdomain.xml CONFIRMED

http://files.livedrive.com/crossdomain.xml

Policy Rules

Request

GET /crossdomain.xml HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Last-Modified: Fri, 11 Mar 2011 17:51:48 GMT
Accept-Ranges: bytes
ETag: "b0ee90fe14e0cb1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:55:11 GMT
Connection: close
Content-Length: 141


<cross-domain-policy>
<allow-access-from domain="*"/>
<site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>
Open Redirection

Open Redirection

1 TOTAL
MEDIUM
CONFIRMED
1
Open Redirection occurs when vulnerable web page is being redirected to another web page via a user controllable input.

Impact

An attacker can use this vulnerability to redirect users to other malicious web sites which can be used for phishing and similar attacks.

Remedy

External References

- /portal/Login/

/portal/Login/ CONFIRMED

http://files.livedrive.com/portal/Login/

Parameters

Parameter Type Value
ctlPassword POST 3
ctlUsername POST Smith
diverturl POST http://www.netsparker.com?
filemethod POST start
lang POST en

Request

POST /portal/Login/ HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: files.livedrive.com
Cookie: PHPSESSID=06dpt9bfggp6iqqli51a3ikno6; AddOn=flash
Content-Length: 101
Accept-Encoding: gzip, deflate

ctlPassword=3&ctlUsername=Smith&diverturl=http%3a%2f%2fwww.netsparker.com%3f&filemethod=start&lang=en

Response

HTTP/1.1 302 Moved Temporarily
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: http://www.netsparker.com?incorrectlogin
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:56:16 GMT
Connection: close
Content-Length: 163


<head><title>Document Moved</title></head><body><h1>Object Moved</h1>This document may be found <a HREF="http://www.netsparker.com?incorrectlogin">here</a></body>
Internal Server Error

Internal Server Error

1 TOTAL
LOW
CONFIRMED
1
The Server responded with an HTTP status 500. This indicates that there is a server-side error. Reasons may vary. The behavior should be analysed carefully. If Netsparker is able to find a security issue in the same resource it will report this as a separate vulnerability.

Impact

The impact may vary depending on the condition. Generally this indicates poor coding practices, not enough error checking, sanitization and whitelisting. However there might be a bigger issue such as SQL Injection. If that's the case Netsparker will check for other possible issues and report them separately.

Remedy

Analyse this issue and review the application code in order to handle unexpected errors, this should be a generic practice which does not disclose further information upon an error. All errors should be handled server side only.
- /portal/Login/

/portal/Login/ CONFIRMED

http://files.livedrive.com/portal/Login/

Parameters

Parameter Type Value
ctlPassword POST 3
ctlUsername POST Smith
diverturl POST http://netsparker.com/n?
filemethod POST start
lang POST en

Request

POST /portal/Login/ HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: files.livedrive.com
Cookie: PHPSESSID=cjkuuo79ndlkbuvgreuk65ok25; AddOn=flash
Content-Length: 94
Accept-Encoding: gzip, deflate

ctlPassword=3&ctlUsername=Smith&diverturl=http://netsparker.com/n?%00&filemethod=start&lang=en

Response

HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:56:25 GMT
Connection: close
Content-Length: 1208


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>
Auto Complete Enabled

Auto Complete Enabled

1 TOTAL
LOW
CONFIRMED
1
"Auto Complete" was enabled in one or more of the form fields. These were either "password" fields or important fields such as "Credit Card".

Impact

Data entered in these fields will be cached by the browser. An attacker who can access the victim's browser could steal this information. This is especially important if the application is commonly used in shared computers such as cyber cafes or airport terminals.

Remedy

Add the attribute autocomplete="off" to the form tag or to individual "input" fields.

Actions to Take

  1. See the remedy for the solution.
  2. Find all instances of inputs which store private data and disable autocomplete. Fields which contain data such as "Credit Card" or "CCV" type data should not be cached. You can allow the application to cache usernames and remember passwords, however, in most cases this is not recommended.
  3. Re-scan the application after addressing the identified issues to ensure that all of the fixes have been applied properly.

Required Skills for Successful Exploitation

Dumping all data from a browser can be fairly easy and there exist a number of automated tools to undertake this. Where the attacker cannot dump the data, he/she could still browse the recently visited websites and activate the auto-complete feature to see previously entered values.

External References

- /portal/resetpassword

/portal/resetpassword CONFIRMED

http://files.livedrive.com/portal/resetpassword

Identified Field Name

ctlPassword

Request

POST /portal/resetpassword HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7; AddOn=flash
Content-Length: 29
Accept-Encoding: gzip, deflate

emailAddress=&_submit_check=1

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"
X-Served-By: 103
Date: Fri, 24 Jun 2011 01:55:56 GMT
Connection: close
Content-Length: 5507


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" />



<meta name=”ROBOTS” CONTENT=”NOINDEX,NOFOLLOW”>
<link rel="stylesheet" href="http://files.livedrive.com/portal/static/css/dtree.css" type="text/css" media="screen" />
<link rel="icon" type="image/png" href="/portal/favicon.png" />
<link rel="stylesheet" type="text/css" href="http://files.livedrive.com/portal/static/css/screen.css?ver=1.1" />
<style type="text/css">body {overflow:auto;}</style>


<script type="text/javascript"> document.domain = "livedrive.com"; </script>

<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=combine&group=prototype&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=common.js&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=main.js&lang=en" ></script>

<script type="text/javascript" src="http://files.livedrive.com/portal/static/js/swfobject.js" ></script>




<title>
Reset password | Livedrive</title>
<script language="javascript" type="text/javascript">
if (self != top) {
top.document.title = document.title
}</script>

</head>
<body>
<div id="mainContainer">
<div id="header-container" style="height:74px;">





<div id="HeaderFade"></div>
<div id="HeaderShadowLeft"></div>
<div id="header" >



<div id="user-login-info" >
<form target="_top" action="http://files.livedrive.com/portal/Login/" method="post">
<input type="hidden" name="lang" id="lang" value="en"/><input type="hidden" name="filemethod" value="start" /><input type="hidden" name="diverturl" id="diverturl" value="http://files.livedrive.com/portal/"/>Username<input type="text" name="ctlUsername" id="username" value=""/>Password<input type="password" name="ctlPassword" id="password" /><input type="submit" value="Login" /><br/></form> </div>





<div id="logo-container"><a href="http://www.livedrive.com/" target="_blank"><img src="http://files.livedrive.com/portal/static/images/livedrive-logo.png" alt="logo" /></a></div> </div>
<div id="HeaderShadowRight"></div>






<div id="no-navigation-container">
<div id="no-navigation-left"></div>
<div id="no-navigation-right"></div>
</div>
</div>

<!-- end: header -->


<div class="outer">


<div id="breadcrumbs-container">
<a id="breadcrumb-home" href="/portal">
<img src="/portal/static/images/header/breadcrumb-home.png">

</a>
<div class="breadcrumb-seperator"></div>


<div class="breadcrumb-item">Settings</div><div class="breadcrumb-seperator"></div>


</div> <!-- end: breadcrumbs-container -->



<div id="PublicBusinessSharingHolder"></div>


<div id="centrecontent" class="settings-content">
<div id="floatwrap" class="float-wrap">
<div id="content" >

<div class="contentWrap">

<div class="portalContent" >


<form method="post" action="">

<h1>Reset password</h1>
<p>Enter the email address you registered with livedrive to reset your account password</p><br/>

<div class="msg-box-red"><p>Please enter an email address.</p></div>
<div class="form-row">
<div class="form-label"><label for="password">Email</label></div>
<div class="form-input">
<input type="text" name="emailAddress" id="emailAddress" class="textinput" value="" /><br /><br />
<input type="hidden" name="_submit_check" value="1"/>
<input type="submit" value="Reset password" class="buttonlink" />
</div>
</div>

</form>


</div> </div>

</div> <!-- end: content -->
<!-- end centered div -->


</div> <!-- end: float-wrap class -->




<div class="clearboth"></div>
<br/>
</div> <!-- end: inner -->
</div> <!-- end: outer -->
</div> <!-- end: mainContainer -->
<div id="Footer">
<p>&copy; 2005 - 2011 Livedrive Internet Ltd | All Rights Reserved | Prices include local taxes unless otherwise stated | <a href="/privacy-policy">Privacy Policy</a> | <a href="/terms-of-use">Terms of Service</a></p>
<p id="CompanyInfo">
Company registration No. 05435857. Registered in England and Wales. VAT No. 879 3921 65.<br/>
Registered office: 1 Kingdom Street, Paddington, London, W2 6BD.</p>
</div>






<script type="text/javascript">


/*** toolbar functions ***/

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-3224643-1");
pageTracker._setDomainName("livedrive.com");
pageTracker._trackPageview();
} catch(err) {}
</script>

</body>
</html>
Cookie Not Marked As HttpOnly

Cookie Not Marked As HttpOnly

1 TOTAL
LOW
CONFIRMED
1
Cookie was not marked as HTTPOnly. HTTPOnly cookies can not be read by client-side scripts therefore marking a cookie as HTTPOnly can provide an additional layer of protection against Cross-site Scripting attacks..

Impact

During a Cross-site Scripting attack an attacker might easily access cookies and hijack the victim's session.

Actions to Take

  1. See the remedy for solution
  2. Consider marking all of the cookies used by the application as HTTPOnly (After these changes javascript code will not able to read cookies.

Remedy

Mark the cookie as HTTPOnly. This will be an extra layer of defence against XSS. However this is not a silver bullet and will not protect the system against Cross-site Scripting attacks. An attacker can use a tool such as XSS Tunnel to bypass HTTPOnly protection.

External References

- /portal/

/portal/ CONFIRMED

http://files.livedrive.com/portal/

Identified Cookie

PHPSESSID

Request

GET /portal/ HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Response

HTTP/1.1 302 Moved Temporarily
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: http://www.livedrive.com/portal/
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
Set-Cookie: PHPSESSID=ats5vu1mi7p8qqtfh0qovav9f1; path=/; domain=files.livedrive.com
X-Served-By: 103
Date: Fri, 24 Jun 2011 01:55:30 GMT
Connection: close
Content-Length: 155


<head><title>Document Moved</title></head><body><h1>Object Moved</h1>This document may be found <a HREF="http://www.livedrive.com/portal/">here</a></body>
ASP.NET Version Disclosure

ASP.NET Version Disclosure

1 TOTAL
LOW
Netsparker identified that the target web server is disclosing ASP.NET version in the HTTP response. This information can help an attacker to develop further attacks and also the system can become an easier target for automated attacks. It was leaked from X-AspNet-Version banner of HTTP response or default ASP.NET error page.

Impact

An attacker can use disclosed information to harvest specific security vulnerabilities for the version identified. The attacker can also use this information in conjunction with the other vulnerabilities in the application or web server.

Remedy

Apply the following changes on your web.config file to prevent information leakage by using custom error pages and removing X-AspNet-Version from HTTP responses.
<System.Web>
     < httpRuntime enableVersionHeader="false" /> 
     <customErrors mode="On" defaultRedirect="~/error/GeneralError.aspx">
          <error statusCode="403" redirect="~/error/Forbidden.aspx" />
          <error statusCode="404" redirect="~/error/PageNotFound.aspx" />
          <error statusCode="500" redirect="~/error/InternalError.aspx" />
     </customErrors>
</System.Web>

Remedy References

- /webservice/AjaxHandler.ashx

/webservice/AjaxHandler.ashx

http://files.livedrive.com/webservice/AjaxHandler.ashx

Extracted Version

2.0.50727

Request

GET /webservice/AjaxHandler.ashx HTTP/1.1
Referer: http://files.livedrive.com/portal/js.php?file=common.js&lang=en
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Cache-Control: private
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:55:12 GMT
Connection: close
Content-Length: 0


PHP Version Disclosure

PHP Version Disclosure

1 TOTAL
LOW
Netsparker identified that the target web server is disclosing the PHP version in use through the HTTP response. This information can help an attacker to gain a greater understanding of the systems in use and potentially develop further attacks targeted at the specific version of PHP.

Impact

An attacker can look for specific security vulnerabilities for the version identified. Also the attacker can use this information in conjunction with the other vulnerabilities in the application or the web server.
- /portal/js.php

/portal/js.php

http://files.livedrive.com/portal/js.php?file=main.js&lang=en

Extracted Version

PHP/5.3.5,ASP.NET

Request

GET /portal/js.php?file=main.js&lang=en HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Cache-Control: private, max-age=10800, pre-check=10800
Pragma: private
Content-Type: application/x-javascript
Content-Encoding:
Expires: Fri, 24 Jun 11 05:55:11 +0100
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:55:11 GMT
Connection: close
Content-Length: 123


// Server: files.livedrive.com
// Domain: livedrive.com
// Source: Memcached
// Generated: June 23, 2011, 3:04 pm
Forbidden Resource

Forbidden Resource

1 TOTAL
INFORMATION
CONFIRMED
1
Access to this resource has been denied by the web server. This is generally not a security issue, and is reported here for information purposes.

Impact

There is no impact resulting from this issue.
- /portal/static/

/portal/static/ CONFIRMED

http://files.livedrive.com/portal/static/

Request

GET /portal/static/ HTTP/1.1
Referer: http://files.livedrive.com/portal/static/css/dtree.css
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 403 Forbidden
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
X-Served-By: 103
Date: Fri, 24 Jun 2011 01:55:31 GMT
Connection: close
Content-Length: 1233


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>403 - Forbidden: Access is denied.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>403 - Forbidden: Access is denied.</h2>
<h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
</fieldset></div>
</div>
</body>
</html>
File Upload Functionality Identified

File Upload Functionality Identified

1 TOTAL
INFORMATION
CONFIRMED
1
This page allows users to upload files to the web server. Upload forms are generally dangerous unless they are coded with a great deal of care. This issue is reported for information only. If there is any other vulnerability identified regarding this resource Netsparker will report it as a separate issue.
- /webservice/

/webservice/ CONFIRMED

http://files.livedrive.com/webservice/

Form Name

fileupload

Request

GET /webservice/ HTTP/1.1
Referer: http://files.livedrive.com/webservice/AjaxHandler.ashx
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:55:15 GMT
Connection: close
Content-Length: 1139




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form method="POST" action="/webservice/upload.handler?ParentId=00000000000000000000000000000000" enctype="multipart/form-data">
<div>
<input type="file" name="fileupload"/><br />

<input type="submit" value="Upload" />
</div>
</form>
<form id="uploadFile" enctype="multipart/form-data" method="post" action="/webservice/upload.aspx?ParentId=00000000000000000000000000000000&DivertURL=http://m.livedrivedev.com/mobile/mobile.php?path=/">
<input type="hidden" value="UploadData" name="Method"/>
<input type="hidden" name="LinkedAccountID" value="55" />
<p>Select a file to upload to the current folder</p>
<br/>
<input id="File" type="file" size="40" name="File"/>
<br/>
<div class="buttons" style="width:300px">
<input class="positive" type="submit" style="font-size: 8pt;" value="Upload file"/>
</div>

</form>

</body>
</html>
E-mail Address Disclosure

E-mail Address Disclosure

1 TOTAL
INFORMATION
Netsparker found e-mail addresses on the web site.

Impact

E-mail addresses discovered within the application can be used by both spam email engines and also brute force tools. Furthermore valid email addresses may lead to social engineering attacks .

Remedy

Use generic email addresses such as contact@ or info@ for general communications, remove user/people specific e-mail addresses from the web site, should this be required use submission forms for this purpose.

External References

- /portal/js.php

/portal/js.php

http://files.livedrive.com/portal/js.php?file=combine&group=prototype&lang=en

Found E-mails

Request

GET /portal/js.php?file=combine&group=prototype&lang=en HTTP/1.1
Referer: http://files.livedrive.com/portal/resetpassword
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Cache-Control: private, max-age=10800, pre-check=10800
Pragma: private
Content-Type: text/javascript
Content-Encoding:
Expires: Fri, 24 Jun 11 05:55:11 +0100
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:55:11 GMT
Connection: close
Content-Length: 68840


// Server: files.livedrive.com
// Domain: livedrive.com
// Memcached
// Generated: June 23, 2011, 9:38 pm
function localize(phrase) {
var localizedStrings={
'Product Name':'{#ProductName#}',
'Briefcase':'{#BriefcaseProduct#}',
'Backup':'{#BackupProduct#}',
'Open':'Open',
'Rename':'Rename',
'Play':'Play',
'Delete':'Delete',
'Undelete':'Undelete',
'Properties':'Properties',
'Download':'Download',
'Rename Item':'Rename Item',
'Share':'Share',
'New folder':'New folder',
'Download Files':'Download Files',
'Any in progress downloads will be aborted':'Any in progress downloads will be aborted',
'Slideshow':'Slideshow',
'Share Item':'Share Item',
'Share properties for':'Share properties for',
'Properties':'Properties',
'Add Album':'Add Album',
'First':'First',
'Last':'Last',
'No files found':'No files found',
'Name':'Name',
'Type':'Type',
'Path':'Path',
'Date':'Date',
'Recycle bin is empty':'Recycle bin is empty',
'Search returned no results':'Search returned no results',
'No files found':'No files found',
'These items have been added to your livedrive':'These items have been added to your {#ProductName#}',
'This item has been added to your livedrive':'This item has been added to your {#ProductName#}',
'Could not queue file at this time':'Could not queue file at this time',
'A file with the name':'A file with the name',
'already exists in this folder. Please try a different name.':'already exists in this folder. Please try a different name.',
'If you change a file name extension, the file may become unusable':'If you change a file name extension, the file may become unusable.\n\nAre you sure you want to change it?',
'Your file name is too long. Please enter a maximum of 256 characters':'Your file name is too long. Please enter a maximum of 256 characters',
'has been changed on another computer, please refresh':'has been changed on another computer, please refresh',
'The filename that you entered contains invalid characters. Please enter a new name.':'The filename that you entered contains invalid characters. Please enter a new name',
'Please select a file to upload':'Please select a file to upload',
'Do you want to overwrite':'Do you want to overwrite',
'Cannot upload this item, a folder with the same name already exists':'Cannot upload this item, a folder with the same name already exists',
'Sending images':'Sending images',
'Getting images':'Getting images',
'The file with name':'The file with name',
'Invalid parent, please refresh and try again':'Invalid parent, please refresh and try again',
'File type not supported':'File type not supported',
'We can not complete this move':'We can not complete this move',
'Are you sure you want to delete this item?':'Are you sure you want to delete this item?',
'Are you sure you want to delete the selected items?':'Are you sure you want to delete the selected items?',
'Warning: Removing this computer will permanently delete the files from your Livedrive account':'Warning: Removing this computer will permanently delete the files from your {#ProductName#} account. You will not be able to undo this action.\r\n\r\nRemoving this computer will have no affect on the files on your local PC. However if you do still plan to run {#ProductName#} {#BackupProduct#} on this PC then {#ProductName#} recommend you run an integrity check.\r\n\r\nAre you sure you want to remove the computer?',
'Are you sure you want to undelete selected item?':'Are you sure you want to undelete selected item?',
'items were renamed':'items were renamed',
'An error occured, please refresh and try again':'An error occured, please refresh and try again',
'Are you sure you want to empty your recycle bin, files will be permanently deleted?':'Are you sure you want to empty your recycle bin, files will be permanently deleted?',
'This version is the same as the current version':'This version is the same as the current version',
'Created':'Created',
'Last Modified':'Last Modified',
'This file is not yet uploaded':'This file is not yet uploaded',
'items selected':'items selected',
'items':'items',
'Already sharing with this user':'Already sharing with this user',
'&laquo; Previous':'&laquo; Previous',
'Next &raquo;':'Next &raquo;',
'Loading...':'Loading...',
'OK':'OK',
'Yes':'Yes',
'No':'No',
'Browser not supported.':'Browser not supported.',
'Sending images to Facebook':'Sending images to Facebook',
'Sending images to Flickr':'Sending images to Flickr',
'Getting images from Facebook':'Getting images from Facebook',
'Getting images from Flickr':'Getting images from Flickr',
'No Songs':'No Songs',
'Preparing upload of':'Preparing upload of',
'Queued File Upload':'Queued File Upload',
'Successful Uploads':'Successful Uploads',
'Failed Uploads':'Failed Uploads',
'No Uploads in progress':'No Uploads in progress',
'Applications':'Applications',
'Recycle':'Recycle',
'Artist':'Artist',
'Album':'Album',
'Year':'Year',
'Genre':'Genre',
'Restore':'Restore',
'Team Folder':'Team Folder',
'already exists in the destination folder.':'already exists in the destination folder.',
'cannot be copied to a read only folder.':'cannot be copied to a read only folder.',
'Remove':'Remove',
'Business Sharing':'Business Sharing',
'New Team Folder':'New Team Folder',
'First Name':'First Name',
'Last Name':'Last Name',
'Email Address':'Email Address',
'Copy to briefcase':'Copy to {#BriefcaseProduct#}',
'You cannot move this item to the selected location. Please select a different location and try again.':'You cannot move this item to the selected location. Please select a different location and try again.',
'You cannot copy this item to the selected location. Please select a different location and try again.':'You cannot copy this item to the selected location. Please select a different location and try again.',
'We can not complete this copy':'We can not complete this copy'

};



return(brandify(localizedStrings[phrase]));



}
function brandify(phrase) {
if(phrase == undefined) return '';
phrase=phrase.replace(/{#ProductName#}/g,'Livedrive');
phrase=phrase.replace(/{#BriefcaseProduct#}/g,'Briefcase');
phrase=phrase.replace(/{#BackupProduct#}/g,'Backup');
return phrase
}/* Prototype JavaScript framework, version 1.6.0.3
* (c) 2005-2008 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/

var Prototype = {
Version: '1.6.0.3',

Browser: {
IE: !!(window.attachEvent &&
navigator.userAgent.indexOf('Opera') === -1),
Opera: navigator.userAgent.indexOf('Opera') > -1,
WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
navigator.userAgent.indexOf('KHTML') === -1,
MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
},

BrowserFeatures: {
XPath: !!document.evaluate,
SelectorsAPI: !!document.querySelector,
ElementExtensions: !!window.HTMLElement,
SpecificElementExtensions:
document.createElement('div')['__proto__'] &&
document.createElement('div')['__proto__'] !==
document.createElement('form')['__proto__']
},

ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,

emptyFunction: function() { },
K: function(x) { return x }
};

if (Prototype.Browser.MobileSafari)
Prototype.BrowserFeatures.SpecificElementExtensions = false;


/* Based on Alex Arnell's inheritance implementation. */
var Class = {
create: function() {
var parent = null, properties = $A(arguments);
if (Object.isFunction(properties[0]))
parent = properties.shift();

function klass() {
this.initialize.apply(this, arguments);
}

Object.extend(klass, Class.Methods);
klass.superclass = parent;
klass.subclasses = [];

if (parent) {
var subclass = function() { };
subclass.prototype = parent.prototype;
klass.prototype = new subclass;
parent.subclasses.push(klass);
}

for (var i = 0; i < properties.length; i++)
klass.addMethods(properties[i]);

if (!klass.prototype.initialize)
klass.prototype.initialize = Prototype.emptyFunction;

klass.prototype.constructor = klass;

return klass;
}
};

Class.Methods = {
addMethods: function(source) {
var ancestor = this.superclass && this.superclass.prototype;
var properties = Object.keys(source);

if (!Object.keys({ toString: true }).length)
properties.push("toString", "valueOf");

for (var i = 0, length = properties.length; i < length; i++) {
var property = properties[i], value = source[property];
if (ancestor && Object.isFunction(value) &&
value.argumentNames().first() == "$super") {
var method = value;
value = (function(m) {
return function() { return ancestor[m].apply(this, arguments) };
})(property).wrap(method);

value.valueOf = method.valueOf.bind(method);
value.toString = method.toString.bind(method);
}
this.prototype[property] = value;
}

return this;
}
};

var Abstract = { };

Object.extend = function(destination, source) {
for (var property in source)
destination[property] = source[property];
return destination;
};

Object.extend(Object, {
inspect: function(object) {
try {
if (Object.isUndefined(object)) return 'undefined';
if (object === null) return 'null';
return object.inspect ? object.inspect() : String(object);
} catch (e) {
if (e instanceof RangeError) return '...';
throw e;
}
},

toJSON: function(object) {
var type = typeof object;
switch (type) {
case 'undefined':
case 'function':
case 'unknown': return;
case 'boolean': return object.toString();
}

if (object === null) return 'null';
if (object.toJSON) return object.toJSON();
if (Object.isElement(object)) return;

var results = [];
for (var property in object) {
var value = Object.toJSON(object[property]);
if (!Object.isUndefined(value))
results.push(property.toJSON() + ': ' + value);
}

return '{' + results.join(', ') + '}';
},

toQueryString: function(object) {
return $H(object).toQueryString();
},

toHTML: function(object) {
return object && object.toHTML ? object.toHTML() : String.interpret(object);
},

keys: function(object) {
var keys = [];
for (var property in object)
keys.push(property);
return keys;
},

values: function(object) {
var values = [];
for (var property in object)
values.push(object[property]);
return values;
},

clone: function(object) {
return Object.extend({ }, object);
},

isElement: function(object) {
return !!(object && object.nodeType == 1);
},

isArray: function(object) {
return object != null && typeof object == "object" &&
'splice' in object && 'join' in object;
},

isHash: function(object) {
return object instanceof Hash;
},

isFunction: function(object) {
return typeof object == "function";
},

isString: function(object) {
return typeof object == "string";
},

isNumber: function(object) {
return typeof object == "number";
},

isUndefined: function(object) {
return typeof object == "undefined";
}
});

Object.extend(Function.prototype, {
argumentNames: function() {
var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
.replace(/\s+/g, '').split(',');
return names.length == 1 && !names[0] ? [] : names;
},

bind: function() {
if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
},

bindAsEventListener: function() {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
return __method.apply(object, [event || window.event].concat(args));
}
},

curry: function() {
if (!arguments.length) return this;
var __method = this, args = $A(arguments);
return function() {
return __method.apply(this, args.concat($A(arguments)));
}
},

delay: function() {
var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
return window.setTimeout(function() {
return __method.apply(__method, args);
}, timeout);
},

defer: function() {
var args = [0.01].concat($A(arguments));
return this.delay.apply(this, args);
},

wrap: function(wrapper) {
var __method = this;
return function() {
return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
}
},

methodize: function() {
if (this._methodized) return this._methodized;
var __method = this;
return this._methodized = function() {
return __method.apply(null, [this].concat($A(arguments)));
};
}
});

Date.prototype.toJSON = function() {
return '"' + this.getUTCFullYear() + '-' +
(this.getUTCMonth() + 1).toPaddedString(2) + '-' +
this.getUTCDate().toPaddedString(2) + 'T' +
this.getUTCHours().toPaddedString(2) + ':' +
this.getUTCMinutes().toPaddedString(2) + ':' +
this.getUTCSeconds().toPaddedString(2) + 'Z"';
};

var Try = {
these: function() {
var returnValue;

for (var i = 0, length = arguments.length; i < length; i++) {
var lambda = arguments[i];
try {
returnValue = lambda();
break;
} catch (e) { }
}

return returnValue;
}
};

RegExp.prototype.match = RegExp.prototype.test;

RegExp.escape = function(str) {
return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
};

/*--------------------------------------------------------------------------*/

var PeriodicalExecuter = Class.create({
initialize: function(callback, frequency) {
this.callback = callback;
this.frequency = frequency;
this.currentlyExecuting = false;

this.registerCallback();
},

registerCallback: function() {
this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
},

execute: function() {
this.callback(this);
},

stop: function() {
if (!this.timer) return;
clearInterval(this.timer);
this.timer = null;
},

onTimerEvent: function() {
if (!this.currentlyExecuting) {
try {
this.currentlyExecuting = true;
this.execute();
} finally {
this.currentlyExecuting = false;
}
}
}
});
Object.extend(String, {
interpret: function(value) {
return value == null ? '' : String(value);
},
specialChar: {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'\\': '\\\\'
}
});

Object.extend(String.prototype, {
gsub: function(pattern, replacement) {
var result = '', source = this, match;
replacement = arguments.callee.prepareReplacement(replacement);

while (source.length > 0) {
if (match = source.match(pattern)) {
result += source.slice(0, match.index);
result += String.interpret(replacement(match));
source = source.slice(match.index + match[0].length);
} else {
result += source, source = '';
}
}
return result;
},

sub: function(pattern, replacement, count) {
replacement = this.gsub.prepareReplacement(replacement);
count = Object.isUndefined(count) ? 1 : count;

return this.gsub(pattern, function(match) {
if (--count < 0) return match[0];
return replacement(match);
});
},

scan: function(pattern, iterator) {
this.gsub(pattern, iterator);
return String(this);
},

truncate: function(length, truncation) {
length = length || 30;
truncation = Object.isUndefined(truncation) ? '...' : truncation;
return this.length > length ?
this.slice(0, length - truncation.length) + truncation : String(this);
},

strip: function() {
return this.replace(/^\s+/, '').replace(/\s+$/, '');
},

stripTags: function() {
return this.replace(/<\/?[^>]+>/gi, '');
},

stripScripts: function() {
return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
},

extractScripts: function() {
var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
var matchOne = new RegExp(Protot..
IIS Version Disclosure

IIS Version Disclosure

1 TOTAL
INFORMATION
Netsparker identified that the target web server is disclosing the web server's version in the HTTP response. This information can help an attacker to gain a greater understanding of the system in use and potentially develop further attacks targeted at the specific web server version.

Impact

An attacker can look for specific security vulnerabilities for the version identified through the SERVER header information.

Remediation

Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
- /webservice/AjaxHandler.ashx

/webservice/AjaxHandler.ashx

http://files.livedrive.com/webservice/AjaxHandler.ashx

Extracted Version

Microsoft-IIS/7.5

Request

GET /webservice/AjaxHandler.ashx HTTP/1.1
Referer: http://files.livedrive.com/portal/js.php?file=common.js&lang=en
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Cache-Control: private
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-Served-By: 101
Date: Fri, 24 Jun 2011 01:55:12 GMT
Connection: close
Content-Length: 0


Redirect Response BODY Is Too Large

Redirect Response BODY Is Too Large

1 TOTAL
INFORMATION
CONFIRMED
1
Netsparker identified that the response from the page returned an HTTP Redirect Status but output more information than usual. This generally indicates that after redirect, page did not finish the response as it was supposed to.

Impact

This can lead serious issues such authentication bypass in authentication required pages, in other pages it generally indicates a programming error.

Remedy

Finish the HTTP Response after you redirect the user.

In ASP.NET use Response.Redirect("redirected-page.aspx", true); instead of Response.Redirect("redirected-page.aspx", false); In PHP applications call exit(); after you redirect the user.
- /portal/Uploader.php

/portal/Uploader.php CONFIRMED

http://files.livedrive.com/portal/Uploader.php

Request

GET /portal/Uploader.php HTTP/1.1
Referer: http://files.livedrive.com/portal/js.php?file=common.js&lang=en
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: files.livedrive.com
Cookie: PHPSESSID=bmtmpe9ri5esp6rama1ots7jp7
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 302 Moved Temporarily
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: http://files.livedrive.com/portal/Uploader.php
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.3.5,ASP.NET
Set-Cookie: AddOn=flash; expires=Fri, 24-Jun-2011 02:55:32 GMT; path=/; domain=livedrive.com
X-Served-By: 103
Date: Fri, 24 Jun 2011 01:55:32 GMT
Connection: close
Content-Length: 19130


<head><title>Document Moved</title></head><body><h1>Object Moved</h1>This document may be found <a HREF="http://files.livedrive.com/portal/Uploader.php">here</a></body>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN"><html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="http://files.livedrive.com/portal/static/css/screen.css" />
<script type="text/javascript"> document.domain = "livedrive.com";</script>
<script type="text/javascript" src="http://files.livedrive.com/portal/static/js/swfobject.js" ></script>

<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=combine&group=prototype&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=common.js&lang=en" ></script>
<script type="text/javascript" src="http://files.livedrive.com/portal/js.php?file=combine&group=swfupload&lang=en" ></script>

</head>
<body>
<span id="noUploaders" class="ldbar-txtlink" style="display:none;"><a href="#" onclick="/settings/upload.php';"> Click here</a> to configure web uploads</span>


<div id="tbULControls" ></div>
<div id="tbULCurrentUpload" style="height:160px; width:270px;">
<div style="margin-bottom: 10px;">
<img id="tbULCurrentUploadImage" src="/portal/static/images/filetypes/32x32/unknown.png" style="float: left; margin-right: 5px;" alt="File Upload Icon" />
<p id="tbULCurrentUploadName"></p>
</div>
<div id="tbULCurrentUploadTime" class="fileUploadInfo"></div> <div id="tbULCurrentUploadPercent" class="fileUploadInfo"></div><br />
<div class="tbULProgBd" ><div id="tbULCurrentUploadProg"></div></div>
<div id="tbULCurrentUploadSize" class="fileUploadInfo"></div> <div id="tbULCurrentUploadBps" class="fileUploadInfo"></div>
<div id="tbULValue" style="display:none;"></div>
<div id="tbULStatus" >
Successful Uploads: 0<br/>
Failed Uploads: 0<br/>
Remaining Uploads: 0<br/>
</div>
<div id="tbULList"></div>





<script type="text/javascript">
var flash = true;
var fileSpeedStats = {};
var FileTypes =new Array("mp3", "nef", "crw", "cr2", "dng","123","3pg","abr","ai","ascx","asf","aspx","asx","avi","bmp","chm","cs","css","csv","diz","dll","doc","docx","dvd","eml","exe","file","fla","flv","gif","htm","html","indd","iso","jpg","jpeg","js","log","m4a","m4b","m4v","mdb","mid","midi","mov","mp3","mp4","mpg","mpp","msg","msi","nfo","nzb","ogg","pdf","php","png","ppt","pptx","psd","ram","rar","raw","rm","rtf","scc","sln","swf","sys","tif","ttf","txt","vb","vsd","wav","wma","wmv","wpd","wps","xls","xlsx","xml","zip");

document.observe("dom:loaded", function() {
LoadPlugins();
setTimeout("updateTBUL()", 1000);
});

formatBPS = function (baseNumber) {
var bpsUnits = [8589934592, 8388608, 8192 , 1], bpsUnitLabels = ["GB/s", "MB/s", "KB/s", "B/s"];
return formatUnits(baseNumber, bpsUnits, bpsUnitLabels, true, 2);

};
formatTime = function (baseNumber) {
var timeUnits = [86400, 3600, 60, 1], timeUnitLabels = ["d", "h", "m", "s"];
return formatUnits(baseNumber, timeUnits, timeUnitLabels, false, 0);

};
formatBytes = function (baseNumber) {
var sizeUnits = [1073741824, 1048576, 1024, 1], sizeUnitLabels = ["GB", "MB", "KB", "bytes"];
return formatUnits(baseNumber, sizeUnits, sizeUnitLabels, true, 2);

};
formatPercent = function (baseNumber) {
return baseNumber.toFixed(0) + "%";
};

formatUnits = function (baseNumber, unitDivisors, unitLabels, singleFractional, dp) {
var i, unit, unitDivisor, unitLabel;

if (baseNumber === 0) {
return "0 " + unitLabels[unitLabels.length - 1];
}

if (singleFractional) {
unit = baseNumber;
unitLabel = unitLabels.length >= unitDivisors.length ? unitLabels[unitDivisors.length - 1] : "";
for (i = 0; i < unitDivisors.length; i++) {
if (baseNumber >= unitDivisors[i]) {
unit = (baseNumber / unitDivisors[i]).toFixed(dp);
unitLabel = unitLabels.length >= i ? " " + unitLabels[i] : "";
break;
}
}

return unit + unitLabel;
} else {
var formattedStrings = [];
var remainder = baseNumber;

for (i = 0; i < unitDivisors.length; i++) {
unitDivisor = unitDivisors[i];
unitLabel = unitLabels.length > i ? " " + unitLabels[i] : "";

unit = remainder / unitDivisor;
if (i < unitDivisors.length -1) {
unit = Math.floor(unit);
} else {
unit = unit.toFixed(dp);
}
if (unit > 0) {
remainder = remainder % unitDivisor;

formattedStrings.push(unit + unitLabel);
}
}

return formattedStrings.join(" ");
}
};

/**
* Ripped from the swfupload.speed.js file, used to calculate a moving average over a collection of
* download speeds.
*
* Use this rolling average to smooth out the time remaining on the download.
*/
calculateMovingAverage = function (history) {
var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
var i;
var mSum = 0, mCount = 0;

size = history.length;

// Check for sufficient data
if (size >= 8) {
// Clone the array and Calculate sum of the values
for (i = 0; i < size; i++) {
vals[i] = history[i];
sum += vals[i];
}

mean = sum / size;

// Calculate variance for the set
for (i = 0; i < size; i++) {
varianceTemp += Math.pow((vals[i] - mean), 2);
}

variance = varianceTemp / size;
standardDev = Math.sqrt(variance);

//Standardize the Data
for (i = 0; i < size; i++) {
vals[i] = (vals[i] - mean) / standardDev;
}

// Calculate the average excluding outliers
var deviationRange = 2.0;
for (i = 0; i < size; i++) {

if (vals[i] <= deviationRange && vals[i] >= -deviationRange) {
mCount++;
mSum += history[i];
}
}

} else {
// Calculate the average (not enough data points to remove outliers)
mCount = size;
for (i = 0; i < size; i++) {
mSum += history[i];
}
}

return mSum / mCount;
};

function LoadPlugins() {

if (!Plugin) {
var Plugin = new Object();
}
Object.extend(Plugin, (new PluginFactory()));

if((!Plugin.isInstalled('Flash')) && (!Plugin.isInstalled('Java'))) {

$('noUploaders').show();

}

if(!Plugin.isInstalled('Java')) {
Cookie.set('AddOn','flash');
}

}



var swfu;

SWFUpload.onload = function () {
var settings = {
minimum_flash_version : "9.0.28",
swfupload_pre_load_handler : swfUploadPreLoad,
swfupload_load_failed_handler : swfUploadLoadFailed,
flash_url : "/portal/static/swfupload/swfupload.swf",
upload_url: "/webservice/upload.aspx?IPhoneId=&ParentID=",
post_params: {},
file_size_limit : "2000 MB",
file_types : "*.*",
file_types_description : "All Files",
file_upload_limit : 0,
file_queue_limit : 0,
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: false,

// Button settings
button_image_url: "/portal/static/swfupload/uploadButton.png", // Relative to the Flash file
button_width: 135,
button_height: 22,
button_placeholder_id: "spanButtonPlaceHolder",
button_window_mode: "transparent",
file_dialog_complete_handler : fileDialogComplete
};
if (flash) {swfu=new SWFUpload(settings);}
};

function updateParentId(newParentId) {
if( flash && swfu) {
swfu.setUploadURL('/webservice/upload.aspx?IPhoneId='+Cookie.get('ASP.NET_SessionId')+'&ParentID='+newParentId);
}
else if(!flash) {
$('UpLoaderApplet').SetParentID(newParentId);
}
}

var lastSuccess=0;
function updateTBUL() {
if(self.opener || !self.opener.uploadsPopupWindow) self.opener.uploadsPopupWindow = self;
try {
var queued = 0;
listText='';

if(flash) {
fileInfoStr=swfu.getFileQueue();
} else {
fileInfoStr=$('UpLoaderApplet').GetUploadQueue();
}



//console.log(fileInfoStr);
/*
// Test Mock
fileInfoStr = [
{
"Id": "1e949e7e-06e9-4fbe-acae-07a04f7b7b35",
"Name": "eclipse-java-galileo-SR1-win32.zip",
"Status": "-1",
"Size": "96984646",
"BytesSent": "31629312"
},
{
"Id": "57d386b5-d879-405f-b0b8-8bf5011dc2bc",
"Name": "FlashDevelop-3.0.6-RTM.exe",
"Status": "-1",
"Size": "4067932",
"BytesSent": "0"
},
{
"Id": "f20e9cf5-0536-404b-bc85-b39e94be81d3",
"Name": "jdk-1_5_0_19-windows-amd64.mp3",
"Status": "-1",
"Size": "34705806",
"BytesSent": "0"
},
{
"Id": "58b147d2-d98b-469b-af50-e90908f04098",
"Name": "PHPEclipse-1.2.3.200910091456PRD-bin.zip",
"Status": "-2",
"Size": "14563068",
"BytesSent": "0"
},
{
"Id": "8cc906d4-8456-4cec-8a7b-173f45fec1a6",
"Name": "ReSharperSetup.5.0.1565.10.msi",
"Status": "-1",
"Size": "39063040",
"BytesSent": "0"
},
{
"Id": "d3ee6d54-3675-4aa6-a29e-9011a3b4abfb",
"Name": "WebDeploymentSetup.msi",
"Status": "-3",
"Size": "702976",
"BytesSent": "0"
}
];*/

// We have the upload file object
if(fileInfoStr!="" && fileInfoStr!="[]"&& fileInfoStr!=undefined ) {
var onlyErrors=true;

$('tbULValue').innerHTML=fileInfoStr;

// APC: Added this enum to aid understanding the different states a file upload passes through.
// It should be kept in sync with the Java Uploader Applet.
/*
var uploadStatusEnum = {
QUEUED : -1,
INPROGRESS : -2,
ERROR : -3,
SUCCESS : -4,
CANCELLED : -5,
HASHING : -7,
CONFLICT : -8,
SKIPPED : -9
};
*/

// Build the queue of all files pending upload, not sure why it's placed into an element first.
var fileInfo = $('tbULValue').innerHTML.evalJSON();
//console.log(fileInfo);
fileInfo.each(function(file, index) {

// Zebra stripe styling
listClass="songOdd";
if(index%2==0) listClass="songEven";

// Sets the main progress panel for the current upload.
if(file.Status==-2) {
onlyErrors=false;
$('tbULCurrentUploadImage').src= getFileTypeImage(file.Name,true);
$('tbULCurrentUploadName').innerHTML= getShortenedFileName(file.Name, 30);
$('tbULCurrentUploadName').title = file.Name;
$('tbULCurrentUploadProg').setStyle({width:Math.floor((file.BytesSent/file.Size)*248)+'px'});

// BUG/APC: Very fast uploads do not appear to update the display
// What about the case where the file upload is in progress, however no data has yet been submitted?

speed=fileSpeed(file);
//console.log(speed);
if(speed.timeRemaining) $('tbULCurrentUploadTime').innerHTML=formatTime(speed.timeRemaining);
if(file.BytesSent) $('tbULCurrentUploadSize').innerHTML=formatBytes(file.BytesSent)+' of '+formatBytes(file.Size);
if(speed.percentUploaded) $('tbULCurrentUploadPercent').innerHTML=formatPercent(speed.percentUploaded)
if(speed.averageSpeed) $('tbULCurrentUploadBps').innerHTML=formatBPS(speed.averageSpeed);
}

if(file.Status==-7) {
onlyErrors=false;
$('tbULCurrentUploadImage').src= getFileTypeImage(file.Name,true);
$('tbULCurrentUploadName').innerHTML= localize('Preparing upload of') + ' ' + file.Name;

// TODO: Hashing prior to uploading
$('tbULCurrentUploadProg').setStyle({width:Math.floor((file.BytesSent/file.Size)*248)+'px'});
}

// All other items are added to the queue
if(file.Status==-1) {
queued = queued+1;
onlyErrors=false;

listText+='<div class="' + listClass + '" >';
listText+='<img style="float:left;margin-right:3px;" src="' + getFileTypeImage(file.Name, false) + '" alt="' + localize('Queued File Upload') + '" />'
listText+='<p style="font-size: 10px;" title="'+file.Name+'">' + getShortenedFileName(file.Name) + '</p>';
listText+='</div>';

//listText+='<div class="'+listClass+'" >' + getFileTypeImage(file.Name,false) + "&nbsp;" + file.Name + '</div>';
}
if(file.Status==-3) {
listText+='<div class="' + listClass + '" >';
listText+='<img style="float:left;margin-right:3px;" src="' + getFileTypeImage(file.Name, false) + '" alt="' + localize('Queued File Upload') + '" />'
listText+='<p style="font-size: 10px;color:red;" title="'+file.Error+'">' + getShortenedFileName(file.Name) + '</p>';
listText+='</div>';
}
});

if(onlyErrors) clearUploadStatus();

} else {
// We have no upload file object
clearUploadStatus();
}

if(flash) {
fileInfoStr=swfu.getStats();
fileInfo=fileInfoStr;
} else {
fileInfoStr=GetStatsProxy();

$('tbULValue').innerHTML=fileInfoStr;
var fileInfo = $('tbULValue').innerHTML.evalJSON(true);

}




if(fileInfoStr!='' && fileInfoStr!='[]' && fileInfoStr!=undefined ) {
if( queued == 0 && fileInfo.successful_uploads != lastSuccess ) {
lastQueued = 0;
self.opener.refreshPage();
}
lastSuccess = fileInfo.successful_uploads;
$('tbULStatus').innerHTML=localize('Successful Uploads') + ': <strong>'+fileInfo.successful_uploads +'</strong><br/>' + localize('Failed Uploads') + ': <strong>'+fileInfo.upload_errors+'</strong><br/>Remaining Uploads: <strong>' + fileInfo.files_queued + '</strong>';
}

$('tbULList').innerHTML=listText;

} catch(e) {
console.log(e);
}
setTimeout("updateTBUL()", 1000);
}

function getFileTypeImage(filename, isLargeIcon) {

var thumbnail = '/portal/static/images/filetypes/' + (isLargeIcon ? '32x32' : '16x16') + '/';
var fileParts = filename.split(".");

if (fileParts.length == 0)
return thumbnail + 'unknown.png';

var fileType = fileParts[fileParts.length-1].toLowerCase();
var fileTypeIndex = FileTypes.indexOf(fileType); // All known file types.
if (fileTypeIndex == -1)
return thumbnail + 'unknow..