Project

General

Profile

« Previous | Next » 

Revision 1168

Added by Dietmar over 14 years ago

security update FCKeditor (thanks to Ruebenwurzel)

View differences:

branches/2.8.x/CHANGELOG
12 12

  
13 13
------------------------------------- 2.8.1 -------------------------------------
14 14
12-Oct-2009 Dietmar Woellbrink
15
!	security update FCKeditor (tks to Ruebenwurzel)
16
12-Oct-2009 Dietmar Woellbrink
15 17
+	added old version of fancybox.js
16 18
!	rename new version fancybox 
17 19
+	added missing language variables in newsmodul
branches/2.8.x/wb/modules/fckeditor/include.php
99 99

  
100 100
	// custom templates can be defined via /wb_config/wb_fcktemplates.xml
101 101
	if(file_exists(WB_PATH .'/modules/fckeditor/wb_config/wb_fcktemplates.xml')) {
102
		$oFCKeditor->Config['TemplatesXmlPath'] = WB_URL.'/modules/FCKeditor/wb_config/wb_fcktemplates.xml';
102
		$oFCKeditor->Config['TemplatesXmlPath'] = WB_URL.'/modules/fckeditor/wb_config/wb_fcktemplates.xml';
103 103
	}
104 104

  
105 105
  // set required file connectors (overwrite settings which may be made in fckconfig.js or my_fckconfig.js)
branches/2.8.x/wb/modules/fckeditor/fckeditor/editor/filemanager/browser/default/frmresourcetype.html
43 43

  
44 44
window.onload = function()
45 45
{
46
	/* HIDE RESOURCE TYPES - NOT USED WITHIN WEBSITE BAKER
46 47
	var oCombo = document.getElementById('cmbType') ;
47 48
	oCombo.innerHTML = '' ;
48 49
	for ( var i = 0 ; i < aTypes.length ; i++ )
......
50 51
		if ( oConnector.ShowAllTypes || aTypes[i][0] == oConnector.ResourceType )
51 52
			AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ;
52 53
	}
54
	*/
53 55
}
54 56

  
55 57
		</script>
56 58
	</head>
57 59
	<body>
60
		<!-- HIDE RESOURCE TYPES - NOT USED IN WEBSITE BAKER 	
58 61
		<table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0">
59 62
			<tr>
60 63
				<td nowrap>
......
65 68
				</td>
66 69
			</tr>
67 70
		</table>
71
		-->
68 72
	</body>
69 73
</html>
branches/2.8.x/wb/modules/fckeditor/fckeditor/editor/filemanager/browser/default/frmresourceslist.html
157 157
		var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ;
158 158
		var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : encodeURI( sCurrentFolderUrl + sFileName ).replace( /#/g, '%23' ) ;
159 159

  
160
		oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;
160
		// hide index.php in browse media - added for Website Baker
161
		if (sFileName != "index.php") 
162
		{
163
			oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;
164
		}
161 165
	}
162 166

  
163 167
	oHtml.Append( '<\/table>' ) ;
branches/2.8.x/wb/modules/fckeditor/fckeditor/editor/filemanager/connectors/test.html
24 24
<html xmlns="http://www.w3.org/1999/xhtml">
25 25
<head>
26 26
	<title>FCKeditor - Connectors Tests</title>
27
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
28
	<script type="text/javascript">
29

  
30
// Automatically detect the correct document.domain (#1919).
31
(function()
32
{
33
	var d = document.domain ;
34

  
35
	while ( true )
36
	{
37
		// Test if we can access a parent property.
38
		try
39
		{
40
			var test = window.opener.document.domain ;
41
			break ;
42
		}
43
		catch( e ) {}
44

  
45
		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
46
		d = d.replace( /.*?(?:\.|$)/, '' ) ;
47

  
48
		if ( d.length == 0 )
49
			break ;		// It was not able to detect the domain.
50

  
51
		try
52
		{
53
			document.domain = d ;
54
		}
55
		catch (e)
56
		{
57
			break ;
58
		}
59
	}
60
})() ;
61

  
62
function BuildBaseUrl( command )
63
{
64
	var sUrl =
65
		document.getElementById('cmbConnector').value +
66
		'?Command=' + command +
67
		'&Type=' + document.getElementById('cmbType').value +
68
		'&CurrentFolder=' + encodeURIComponent(document.getElementById('txtFolder').value) ;
69

  
70
	return sUrl ;
71
}
72

  
73
function SetFrameUrl( url )
74
{
75
	document.getElementById('eRunningFrame').src = url ;
76

  
77
	document.getElementById('eUrl').innerHTML = url ;
78
}
79

  
80
function GetFolders()
81
{
82
	SetFrameUrl( BuildBaseUrl( 'GetFolders' ) ) ;
83
	return false ;
84
}
85

  
86
function GetFoldersAndFiles()
87
{
88
	SetFrameUrl( BuildBaseUrl( 'GetFoldersAndFiles' ) ) ;
89
	return false ;
90
}
91

  
92
function CreateFolder()
93
{
94
	var sFolder = prompt( 'Type the folder name:', 'Test Folder' ) ;
95

  
96
	if ( ! sFolder )
97
		return false ;
98

  
99
	var sUrl = BuildBaseUrl( 'CreateFolder' ) ;
100
	sUrl += '&NewFolderName=' + encodeURIComponent( sFolder ) ;
101

  
102
	SetFrameUrl( sUrl ) ;
103
	return false ;
104
}
105

  
106
function OnUploadCompleted( errorNumber, fileName )
107
{
108
	switch ( errorNumber )
109
	{
110
		case 0 :
111
			alert( 'File uploaded with no errors' ) ;
112
			break ;
113
		case 201 :
114
			GetFoldersAndFiles() ;
115
			alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
116
			break ;
117
		case 202 :
118
			alert( 'Invalid file' ) ;
119
			break ;
120
		default :
121
			alert( 'Error on file upload. Error number: ' + errorNumber ) ;
122
			break ;
123
	}
124
}
125

  
126
this.frames.frmUpload = this ;
127

  
128
function SetAction()
129
{
130
	var sUrl = BuildBaseUrl( 'FileUpload' ) ;
131
	document.getElementById('eUrl').innerHTML = sUrl ;
132
	document.getElementById('frmUpload').action = sUrl ;
133
}
134

  
135
	</script>
136 27
</head>
137 28
<body>
138
	<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
139
		<tr>
140
			<td>
141
				<table cellspacing="0" cellpadding="0" border="0">
142
					<tr>
143
						<td>
144
							Connector:<br />
145
							<select id="cmbConnector" name="cmbConnector">
146
								<option value="asp/connector.asp" selected="selected">ASP</option>
147
								<option value="aspx/connector.aspx">ASP.Net</option>
148
								<option value="cfm/connector.cfm">ColdFusion</option>
149
								<option value="lasso/connector.lasso">Lasso</option>
150
								<option value="perl/connector.cgi">Perl</option>
151
								<option value="php/connector.php">PHP</option>
152
								<option value="py/connector.py">Python</option>
153
							</select>
154
						</td>
155
						<td>
156
							&nbsp;&nbsp;&nbsp;</td>
157
						<td>
158
							Current Folder<br />
159
							<input id="txtFolder" type="text" value="/" name="txtFolder" /></td>
160
						<td>
161
							&nbsp;&nbsp;&nbsp;</td>
162
						<td>
163
							Resource Type<br />
164
							<select id="cmbType" name="cmbType">
165
								<option value="File" selected="selected">File</option>
166
								<option value="Image">Image</option>
167
								<option value="Flash">Flash</option>
168
								<option value="Media">Media</option>
169
								<option value="Invalid">Invalid Type (for testing)</option>
170
							</select>
171
						</td>
172
					</tr>
173
				</table>
174
				<br />
175
				<table cellspacing="0" cellpadding="0" border="0">
176
					<tr>
177
						<td valign="top">
178
							<a href="#" onclick="GetFolders();">Get Folders</a></td>
179
						<td>
180
							&nbsp;&nbsp;&nbsp;</td>
181
						<td valign="top">
182
							<a href="#" onclick="GetFoldersAndFiles();">Get Folders and Files</a></td>
183
						<td>
184
							&nbsp;&nbsp;&nbsp;</td>
185
						<td valign="top">
186
							<a href="#" onclick="CreateFolder();">Create Folder</a></td>
187
						<td>
188
							&nbsp;&nbsp;&nbsp;</td>
189
						<td valign="top">
190
							<form id="frmUpload" action="" target="eRunningFrame" method="post" enctype="multipart/form-data">
191
								File Upload<br />
192
								<input id="txtFileUpload" type="file" name="NewFile" />
193
								<input type="submit" value="Upload" onclick="SetAction();" />
194
							</form>
195
						</td>
196
					</tr>
197
				</table>
198
				<br />
199
				URL: <span id="eUrl"></span>
200
			</td>
201
		</tr>
202
		<tr>
203
			<td height="100%" valign="top">
204
				<iframe id="eRunningFrame" src="javascript:void(0)" name="eRunningFrame" width="100%"
205
					height="100%"></iframe>
206
			</td>
207
		</tr>
208
	</table>
209 29
</body>
210 30
</html>
branches/2.8.x/wb/modules/fckeditor/fckeditor/editor/filemanager/connectors/uploadtest.html
23 23
<html>
24 24
	<head>
25 25
		<title>FCKeditor - Uploaders Tests</title>
26
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
27
		<script type="text/javascript">
28

  
29
// Automatically detect the correct document.domain (#1919).
30
(function()
31
{
32
	var d = document.domain ;
33

  
34
	while ( true )
35
	{
36
		// Test if we can access a parent property.
37
		try
38
		{
39
			var test = window.opener.document.domain ;
40
			break ;
41
		}
42
		catch( e ) {}
43

  
44
		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
45
		d = d.replace( /.*?(?:\.|$)/, '' ) ;
46

  
47
		if ( d.length == 0 )
48
			break ;		// It was not able to detect the domain.
49

  
50
		try
51
		{
52
			document.domain = d ;
53
		}
54
		catch (e)
55
		{
56
			break ;
57
		}
58
	}
59
})() ;
60

  
61
function SendFile()
62
{
63
	var sUploaderUrl = cmbUploaderUrl.value ;
64

  
65
	if ( sUploaderUrl.length == 0 )
66
		sUploaderUrl = txtCustomUrl.value ;
67

  
68
	if ( sUploaderUrl.length == 0 )
69
	{
70
		alert( 'Please provide your custom URL or select a default one' ) ;
71
		return ;
72
	}
73

  
74
	eURL.innerHTML = sUploaderUrl ;
75
	txtUrl.value = '' ;
76

  
77
	var date = new Date()
78

  
79
	frmUpload.action = sUploaderUrl + '?time=' + date.getTime();
80
	if (document.getElementById('cmbType').value) {
81
		frmUpload.action = frmUpload.action + '&Type='+document.getElementById('cmbType').value;
82
	}
83
	if (document.getElementById('CurrentFolder').value) {
84
		frmUpload.action = frmUpload.action + '&CurrentFolder='+document.getElementById('CurrentFolder').value;
85
	}
86
	frmUpload.submit() ;
87
}
88

  
89
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
90
{
91
	switch ( errorNumber )
92
	{
93
		case 0 :	// No errors
94
			txtUrl.value = fileUrl ;
95
			alert( 'File uploaded with no errors' ) ;
96
			break ;
97
		case 1 :	// Custom error
98
			alert( customMsg ) ;
99
			break ;
100
		case 10 :	// Custom warning
101
			txtUrl.value = fileUrl ;
102
			alert( customMsg ) ;
103
			break ;
104
		case 201 :
105
			txtUrl.value = fileUrl ;
106
			alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
107
			break ;
108
		case 202 :
109
			alert( 'Invalid file' ) ;
110
			break ;
111
		case 203 :
112
			alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
113
			break ;
114
		default :
115
			alert( 'Error on file upload. Error number: ' + errorNumber ) ;
116
			break ;
117
	}
118
}
119

  
120
		</script>
121 26
	</head>
122 27
	<body>
123
		<table cellSpacing="0" cellPadding="0" width="100%" border="0" height="100%">
124
			<tr>
125
				<td>
126
					<table cellSpacing="0" cellPadding="0" width="100%" border="0">
127
						<tr>
128
							<td nowrap>
129
								Select the "File Uploader" to use: <br>
130
								<select id="cmbUploaderUrl">
131
									<option selected value="asp/upload.asp">ASP</option>
132
									<option value="aspx/upload.aspx">ASP.Net</option>
133
									<option value="cfm/upload.cfm">ColdFusion</option>
134
									<option value="lasso/upload.lasso">Lasso</option>
135
									<option value="perl/upload.cgi">Perl</option>
136
									<option value="php/upload.php">PHP</option>
137
									<option value="py/upload.py">Python</option>
138
									<option value="">(Custom)</option>
139
								</select>
140
							</td>
141
						<td>
142
							Resource Type<br />
143
							<select id="cmbType" name="cmbType">
144
								<option value="">None</option>
145
								<option value="File">File</option>
146
								<option value="Image">Image</option>
147
								<option value="Flash">Flash</option>
148
								<option value="Media">Media</option>
149
								<option value="Invalid">Invalid Type (for testing)</option>
150
							</select>
151
						</td>
152
						<td>
153
						Current Folder: <br>
154
						<input type="text" name="CurrentFolder" id="CurrentFolder" value="/">
155
						</td>
156
							<td nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
157
							<td width="100%">
158
								Custom Uploader URL:<BR>
159
								<input id="txtCustomUrl" style="WIDTH: 100%; BACKGROUND-COLOR: #dcdcdc" disabled type="text">
160
							</td>
161
						</tr>
162
					</table>
163
					<br>
164
					<table cellSpacing="0" cellPadding="0" width="100%" border="0">
165
						<tr>
166
							<td noWrap>
167
								<form id="frmUpload" target="UploadWindow" enctype="multipart/form-data" action="" method="post">
168
									Upload a new file:<br>
169
									<input type="file" name="NewFile"><br>
170

  
171
									<input type="button" value="Send it to the Server" onclick="SendFile();">
172
								</form>
173
							</td>
174
							<td style="WIDTH: 16px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
175
							<td vAlign="top" width="100%">
176
								Uploaded File URL:<br>
177
								<INPUT id="txtUrl" style="WIDTH: 100%" readonly type="text">
178
							</td>
179
						</tr>
180
					</table>
181
					<br>
182
					Post URL: <span id="eURL">&nbsp;</span>
183
				</td>
184
			</tr>
185
			<tr>
186
				<td height="100%">
187
					<iframe name="UploadWindow" width="100%" height="100%" src="javascript:void(0)"></iframe>
188
				</td>
189
			</tr>
190
		</table>
191 28
	</body>
192 29
</html>

Also available in: Unified diff