We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd6eeed commit c2624f3Copy full SHA for c2624f3
1 file changed
www/work/getwork.php
@@ -285,6 +285,16 @@ function GetJob()
285
$workDir = "./work/jobs/$location";
286
$locInfo = GetLocationInfo($location);
287
$locKey = GetSetting('location_key', '');
288
+
289
+ if (array_key_exists('ips', $locInfo)) {
290
+ $tester_ip = $_SERVER['REMOTE_ADDR'];
291
+ $ips = explode(',', $locInfo['ips']);
292
+ if (!in_array($tester_ip, $ips)) {
293
+ header("HTTP/1.1 403 Unauthorized");
294
+ exit();
295
+ }
296
297
298
if (isset($locInfo) && is_array($locInfo) && isset($locInfo['key'])) {
299
$locKey = $locInfo['key'];
300
}
0 commit comments