File tree Expand file tree Collapse file tree 5 files changed +5
-69
lines changed Expand file tree Collapse file tree 5 files changed +5
-69
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ let pool_size_is_restricted ~__context =
119119  not  (Pool_features. is_enabled ~__context Features. Pool_size )
120120
121121let  bugreport_upload  ~__context  ~host :_   ~url   ~options   = 
122+   if  url =  " "   then 
123+     raise Api_errors. (Server_error  (invalid_value, [" url"  ; " "  ])) ;
122124  let  proxy = 
123125    if  List. mem_assoc " http_proxy"   options then 
124126      List. assoc " http_proxy"   options
Original file line number Diff line number Diff line change @@ -149,5 +149,6 @@ let destroy ~__context ~self =
149149
150150let  upload  ~__context  ~self   ~url   ~options   = 
151151  let  filename =  Db.Host_crashdump. get_filename ~__context ~self  in 
152-   let  url =  if  url =  " "   then  upload_url filename else  url in 
152+   if  url =  " "   then 
153+     raise Api_errors. (Server_error  (invalid_value, [" url"  ; " "  ])) ;
153154  do_upload " host-crash-upload"   (crash_dir ^  " /"   ^  filename) url options
Original file line number Diff line number Diff line change 1414module  D  =  Debug. Make  (struct  let  name =  " xapi_support"   end )
1515
1616open  D 
17- 
18- let  support_url =  " ftp://support.xensource.com/uploads/" 
19- 
20- (*  URL to which the crashdump/whatever will be uploaded *) 
21- let  upload_url  name  = 
22-   let  uuid =  Xapi_inventory. lookup Xapi_inventory. _installation_uuid in 
23-   Printf. sprintf " %s%s-%s"   support_url uuid name
24- 
2517open  Forkhelpers 
2618
2719let  do_upload  label  file  url  options  = 
Original file line number Diff line number Diff line change 44# 
55#  Upload a bugreport to the support website
66
7- DEFAULT_BASE_URL=" ftp://support.xensource.com/uploads/" 
8- 
97#  If the user supplies a bare filename without a URI scheme,
108#  we ignore it -- if they _really_ want to upload named files
119#  to our support server, they can specify the URI scheme.
@@ -19,7 +17,7 @@ if [ -z "$FILENAME" ]; then
1917  .  @INVENTORY@
2018  FILENAME=${INSTALLATION_UUID} -${now} 
2119fi 
22- [ !   -z  " ${BASE_URL} "   ] ||  BASE_URL= " ${DEFAULT_BASE_URL} " 
20+ [ -n  " ${BASE_URL} "   ] ||  exit  1 
2321
2422URL=" ${BASE_URL}${FILENAME} " 
2523
  Load Diff This file was deleted. 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments