aboutsummaryrefslogtreecommitdiff
path: root/plugins/video_upload
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-19 20:55:12 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-19 20:55:12 +0000
commit107e6f3bbc6963173e04b8350d4401ccb314e4fd (patch)
tree5d0868c8fca1c642f363e6c006c031541e3143e5 /plugins/video_upload
parentbff6fafe62a4201c99bdba20144313276d654bca (diff)
downloadvideo-107e6f3bbc6963173e04b8350d4401ccb314e4fd.tar.gz
video-107e6f3bbc6963173e04b8350d4401ccb314e4fd.tar.bz2
Corrected some XSS vulnerabilities.
Thanks to Dries Buytaert for pointing them out. Chænged '%d' to %d for Postgres SQL compatibility
Diffstat (limited to 'plugins/video_upload')
-rw-r--r--plugins/video_upload/video_upload.module70
1 files changed, 36 insertions, 34 deletions
diff --git a/plugins/video_upload/video_upload.module b/plugins/video_upload/video_upload.module
index 22f8b1c..1f82b2a 100644
--- a/plugins/video_upload/video_upload.module
+++ b/plugins/video_upload/video_upload.module
@@ -63,40 +63,42 @@ function video_upload_perm() {
* Implementation of hook_nodeapi()
*/
function video_upload_nodeapi(&$node, $op, $teaser) {
- switch ($op) {
-
- case 'load':
- $output['video_upload_file'] = _video_upload_load($node);
- $output['vidfile'] = file_create_url($output['video_upload_file']->filepath);
- return $output;
- case 'prepare':
- _video_upload_prepare($node);
- break;
-
- case 'validate':
- _video_upload_validate($node);
- break;
-
-
- case 'submit':
- _video_upload_submit($node);
- break;
-
- case 'insert':
- case 'update':
- _video_upload_store($node);
- break;
-
- case 'delete':
- ;
- break;
-
- case 'delete revision':
- video_upload_delete_revision($node);
- break;
-
-
-
+ if($node->type == 'video') {
+ switch ($op) {
+
+ case 'load':
+ $output['video_upload_file'] = _video_upload_load($node);
+ $output['vidfile'] = file_create_url($output['video_upload_file']->filepath);
+ return $output;
+ case 'prepare':
+ _video_upload_prepare($node);
+ break;
+
+ case 'validate':
+ _video_upload_validate($node);
+ break;
+
+
+ case 'submit':
+ _video_upload_submit($node);
+ break;
+
+ case 'insert':
+ case 'update':
+ _video_upload_store($node);
+ break;
+
+ case 'delete':
+ ;
+ break;
+
+ case 'delete revision':
+ video_upload_delete_revision($node);
+ break;
+
+
+
+ }
}
}