Proyectos de Subversion Moodle

Rev

Rev 53 | Rev 55 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 53 Rev 54
Línea 23... Línea 23...
23
require_once __DIR__ . '/rsa.php';
23
require_once __DIR__ . '/rsa.php';
24
require_once __DIR__ . '/lib.php';
24
require_once __DIR__ . '/lib.php';
Línea 25... Línea 25...
25
 
25
 
Línea 26... Línea 26...
26
header('Content-type: text/plain');
26
header('Content-type: text/plain');
27
 
27
 
28
/*
28
 
29
$username   = trim(isset($_SERVER['HTTP_USERNAME']) ? filter_var($_SERVER['HTTP_USERNAME'], FILTER_SANITIZE_STRING) : '');
29
$username   = trim(isset($_SERVER['HTTP_USERNAME']) ? filter_var($_SERVER['HTTP_USERNAME'], FILTER_SANITIZE_STRING) : '');
30
$password   = trim(isset($_SERVER['HTTP_PASSWORD']) ? filter_var($_SERVER['HTTP_PASSWORD'], FILTER_SANITIZE_STRING) : '');
30
$password   = trim(isset($_SERVER['HTTP_PASSWORD']) ? filter_var($_SERVER['HTTP_PASSWORD'], FILTER_SANITIZE_STRING) : '');
31
$timestamp  = trim(isset($_SERVER['HTTP_TIMESTAMP']) ? filter_var($_SERVER['HTTP_TIMESTAMP'], FILTER_SANITIZE_STRING) : '');
31
$timestamp  = trim(isset($_SERVER['HTTP_TIMESTAMP']) ? filter_var($_SERVER['HTTP_TIMESTAMP'], FILTER_SANITIZE_STRING) : '');
Línea 65... Línea 65...
65
 
65
 
66
if(!password_verify( $username.'-'. LLWS_PASSWORD. '-' . $rand. '-' . $timestamp, $password)) {
66
if(!password_verify( $username.'-'. LLWS_PASSWORD. '-' . $rand. '-' . $timestamp, $password)) {
67
    echo json_encode(['success' => false, 'data' => 'ERROR_SECURITY5']) ;
67
    echo json_encode(['success' => false, 'data' => 'ERROR_SECURITY5']) ;
68
    exit;
68
    exit;
69
}
69
}
Línea 70... Línea 70...
70
*/
70
 
Línea 134... Línea 134...
134
                'filesize'  => $file->get_filesize(),
134
                'filesize'  => $file->get_filesize(),
135
                'content'   => base64_encode($file->get_content()),
135
                'content'   => base64_encode($file->get_content()),
136
            ];
136
            ];
Línea 137... Línea 137...
137
 
137
 
138
        }
-
 
139
        
-
 
140
      
-
 
141
        
-
 
142
        
138
        }
Línea 143... Línea 139...
143
    }
139
    }