Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion crates/data/src/source/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ pub fn with_optional_still<T>(still: Option<Still>, f: impl FnOnce() -> T) -> T
}
let previous = current_still();
let combined = match (previous.clone(), still) {
(Some(a), Some(b)) => Some(std::sync::Arc::new(move || a() && b()) as Still),
(Some(a), Some(b)) => {
let held = is_held_still(&a) || is_held_still(&b);
let both = std::sync::Arc::new(move || a() && b()) as Still;
Some(if held { held_still(both) } else { both })
}
(Some(a), None) => Some(a),
(None, b) => b,
};
Expand All @@ -121,6 +125,32 @@ pub fn with_captured_still<T>(still: Option<Still>, f: impl FnOnce() -> T) -> T
f()
}

/// The request contexts whose requests may reach only the internet ([`held_still`]).
static HELD: std::sync::Mutex<Vec<std::sync::Weak<dyn Fn() -> bool + Send + Sync>>> = std::sync::Mutex::new(Vec::new());

/// Marks `still` as holding its requests to the internet (a plugin's command: plugins reach only
/// the internet). The mark goes wherever the context does: a worker that re-enters it
/// ([`current_still`], [`with_optional_still`], [`with_captured_still`]) is held too, and so is a
/// context it is combined with.
pub fn held_still(still: Still) -> Still {
let mut held = HELD.lock().unwrap_or_else(|e| e.into_inner());
held.retain(|w| w.strong_count() > 0);
held.push(std::sync::Arc::downgrade(&still));
still
}

/// Whether `still` was marked by [`held_still`].
fn is_held_still(still: &Still) -> bool {
let at = std::sync::Arc::as_ptr(still).cast::<()>();
HELD.lock().unwrap_or_else(|e| e.into_inner()).iter().any(|w| std::sync::Weak::as_ptr(w).cast::<()>() == at)
}

/// Whether this thread's requests may reach only the internet: its request context was marked
/// by [`held_still`].
pub fn requests_held() -> bool {
current_still().is_some_and(|still| is_held_still(&still))
}

/// Checked immediately before a request-producing stage, without suspension before sending.
pub fn check_still(still: &Option<Still>) -> std::result::Result<(), String> {
if still.as_ref().is_some_and(|s| !s()) { Err("request cancelled before it was sent".into()) } else { Ok(()) }
Expand Down
8 changes: 5 additions & 3 deletions crates/engine/src/cmd/embeddings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,12 @@ fn read_window(url: &str, area: [f64; 4], cell: Option<f64>) -> Result<super::la
use std::sync::atomic::{AtomicBool, Ordering};
let asked = super::layer::WindowAsked::of(url, area, cell, AEF_BANDS);
let stop = AtomicBool::new(false);
// The reader carries the request context on (a plugin's command reaches only the internet).
let still = crate::render::rustgis_tiles::cache::current_still();
let w = std::thread::scope(|scope| {
let reader = std::thread::Builder::new()
.name("AlphaEarth window".into())
.spawn_scoped(scope, || super::layer::read_window_raster(&asked, &stop));
let reader = std::thread::Builder::new().name("AlphaEarth window".into()).spawn_scoped(scope, || {
crate::render::rustgis_tiles::cache::with_optional_still(still, || super::layer::read_window_raster(&asked, &stop))
});
let Ok(reader) = reader else { return super::layer::read_window_raster(&asked, &stop) };
while !reader.is_finished() {
if rustgis_data::progress::check().is_err() {
Expand Down
71 changes: 68 additions & 3 deletions crates/engine/src/cmd/plugin_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,28 @@ fn cache() -> std::sync::MutexGuard<'static, Cache> {
CACHE.lock().unwrap_or_else(|e| e.into_inner())
}

#[cfg(test)]
#[cfg(any(test, all(feature = "testing", debug_assertions)))]
thread_local! {
/// Tests: let the plugin fetch from this computer (a test server) and, when `wait` is off,
/// fetch as the browser does (pending, then run again).
pub(crate) static TEST: std::cell::Cell<(bool, bool)> = const { std::cell::Cell::new((false, true)) };
}

/// Tests in other crates: lets the plugins this thread runs reach this computer (their test
/// server), with `host.fetch` and the addresses they give commands, as the engine's own tests do.
/// Only in a test build: the `testing` feature with debug assertions, never a release build.
#[cfg(all(feature = "testing", debug_assertions))]
#[doc(hidden)]
pub fn plugins_reach_this_computer() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin reach check is now switched off by a Cargo feature, not only by cfg(test). allow_local() returns true for any build with rustgis-engine's testing feature once plugins_reach_this_computer() has run on that thread, and that function is pub and #[doc(hidden)]. Today only dev-dependencies enable testing (ui-egui, assistant, engine's own tests), so release builds are safe. A future non-dev dependency that enables testing would silently remove the local-network guard for plugins. Suggest keeping the hook cfg(test)-only in this crate, or exposing a narrower test-support function behind a feature whose name says it is for tests and that release crates cannot enable by accident.

Category: security

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 78ccd3f. The hook now needs debug assertions as well as the testing feature (all(feature = "testing", debug_assertions), and cfg(test) inside the engine as before). A release build can't carry it even if something enables testing by accident. The tests that use it build with the dev profile, as CI's do.

TEST.with(|t| t.set((true, t.get().1)));
}

fn allow_local() -> bool {
#[cfg(test)]
#[cfg(any(test, all(feature = "testing", debug_assertions)))]
{
TEST.with(|t| t.get().0)
}
#[cfg(not(test))]
#[cfg(not(any(test, all(feature = "testing", debug_assertions))))]
{
false
}
Expand Down Expand Up @@ -188,6 +197,62 @@ impl Session {
Err(e) => Err(e),
}
}

/// Whether what runs now is held to the internet: a plugin's authority is in the scope (as
/// for [`Self::named_reach`]), unless a test lets it reach its server on this computer.
pub(crate) fn plugin_held(&self) -> bool {
self.policy_plugin() && !allow_local()
}

/// Holds the web addresses a plugin gives a command that connects as [`Self::named_reach`]
/// holds the service it names, with its wording: each one among the command's parameters
/// (not inside the contents of a file it gives, `data` or `text`) on this computer or the local
/// network is refused, naming it, before anything is read. The rest are recorded as reaching
/// only the internet ([`cache::restrict_to_public`]), wherever their names resolve, so the
/// reads made of them later or elsewhere (a download left to the app, a tile layer drawn)
/// are held there too; while the command runs, all its requests are
/// ([`cache::held_to_public`]). Any other caller's addresses are its own choice, as before.
///
/// [`cache::restrict_to_public`]: crate::render::rustgis_tiles::cache::restrict_to_public
/// [`cache::held_to_public`]: crate::render::rustgis_tiles::cache::held_to_public
pub(crate) fn hold_plugin_addresses(&self, params: &Value) -> Result<(), String> {
if !self.plugin_held() {
return Ok(());
}
let named = web_addresses(params);
for url in &named {
// An address wrong some other way (spaces in it) is the command's to judge; it is
// held to the internet below all the same.
if let Err(e) = address::check_reach(url, address::Reach::Public)
&& address::is_refusal(&e)
{
return Err(crate::sources::message_with_address(url, INTERNET_ONLY));
}
}
for url in named {
crate::render::rustgis_tiles::cache::restrict_to_public(url);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public-only restriction doesn't reach the requests these commands derive from the address, so a public-looking name that resolves to a local address is still read.

restrict_to_public(url) records the exact address the plugin gave. Several commands then fetch a derived URL, and ceiling_for looks that up by its own full path, so the derived URL has no record and gets a Local ceiling:

  • stac.collections fetches stac::collections_url(api) ({api}/collections) through download_blocking_with_origin.
  • stac.search fetches {api}/search?… (or /search by POST) the same way.
  • portal.search calls fetch(&url), which is fetch_within(url, Reach::Local), with url built by portal.search_url (…/api/3/action/package_search?…).

resource_of keeps the full path, so the restriction on https://host/stac doesn't match https://host/stac/collections. With Local, the resolver's public_only is false (cache.rs download_agent vs public_agent), so if host resolves to 127.0.0.1 or a LAN address, the request connects.

The case that would be refused is a literal local address (caught up front by check_reach). A public name that resolves locally is the case the docs and the PR description say is covered ("read only from the internet, wherever its name resolves"), and the new test never exercises it: it only uses literal 127.0.0.1 and 192.168.x addresses, and the tiles check asserts ceiling_for on the exact URL only.

Suggested fix: have each of these commands take its ceiling from s.named_reach(&api)? (or named_reach(url) for portals) and pass it to the download, as service.rs already does with named_reach(url)?.min(ceiling_for(&request)). Then add a regression test with a DNS fixture (the resolver fixture in cache.rs already exists) that maps a public-looking host to 127.0.0.1 and asserts stac.collections, stac.search and portal.search are not answered from it.

Category: security

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in d86623e. Recording the exact address alone didn't hold what a command derives from it, as you say. While a network command runs under a plugin's authority, every request it makes on that thread is now held to the internet: cache::held_to_public, set in the policy's with_node, and cache::ceiling_for returns Public while it is set. That covers stac.collections/stac.search ({api}/collections, /search), portal.search's built URL (fetch_within takes ceiling.min(ceiling_for(url))) and next pages, without a per-command change.

Tests: the tiles test a_held_thread_reads_only_from_the_internet shows an address with nothing recorded (a derived listing) refused on 127.0.0.1 while held and read once the hold ends; the existing resolver test covers the public agent refusing a name that resolves locally. The engine test a_plugin_lists_a_bucket_only_from_the_internet shows a request the plugin never named (an S3 listing through the user's connection on 127.0.0.1) refused for a plugin and read for the user; it fails with the hold off.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restrict_to_public here has two effects beyond this command, both process-wide and not reversible by the user short of restart:

  • It removes the user's own explicit allowance for the same base (cache.rs named_local.remove(base)). If the user added a LAN-hosted address by a DNS name that resolves locally, a plugin naming that name with layer.addUrl revokes it, and the user's later reads of that layer are refused.
  • Each recorded address counts toward MAX_PUBLIC_ONLY. A plugin with the network permission can fill the table (16,384 addresses). After that, every address the user has not named is read only from the internet until restart, including follow-up reads from LAN services the user did use.

The PR discloses both trade-offs and the new notice covers the second, so this is a design question rather than a defect. Suggest scoping the record to the command's own run, or keeping plugin-recorded addresses out of named_local and the saturation count.

Category: security

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both effects are deliberate, and the PR body states them.

The record has to win over the user's earlier allowance. Some reads of the address happen after the command returns, outside its request context: a download left to the app, or a tile layer drawn later. Those reads only see what is recorded. If a plugin-named address kept the user's allowance, they would read the local network for the plugin. Recording it is how a document's links are held today. The user gets the allowance back by naming the address directly (layer.addUrl, as for document links), or by restarting.

On filling the table: a plugin's addresses count as a document's do. When the table fills, the new notice says so once, which is the "never silent" half of this PR.

Scoping the record to the command's run would leave those later reads unheld. Keeping plugin records in a table of their own would mean a second cap and a second notice; that is left out of this hardening change.

}
Ok(())
}
}

/// The web addresses among a command's own parameters, not inside the contents of a file it
/// gives (`data`, `text`).
fn web_addresses(params: &Value) -> Vec<&str> {
let Some(o) = params.as_object() else { return Vec::new() };
o.iter()
.filter(|(key, _)| !matches!(key.as_str(), "data" | "text"))
.filter_map(|(_, v)| v.as_str().map(str::trim))
.filter(|v| is_web_address(v))
.collect()
}

/// Whether `v` is a web address the app fetches (`http://`, `https://` or `s3://`), as given or
/// marked with a saved login, an S3 connection or an anonymous read.
fn is_web_address(v: &str) -> bool {
let plain = crate::render::rustgis_tiles::s3::split_anonymous(v).0;
let plain = rustgis_data::login_address::inner(rustgis_data::s3_address::inner(plain)).to_ascii_lowercase();
["http://", "https://", "s3://"].iter().any(|scheme| plain.starts_with(scheme))
}

/// The answer for a fetched document: `{url, text}`, and `json` when the text is a JSON object
Expand Down
20 changes: 20 additions & 0 deletions crates/engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,7 @@ impl Session {
// And the coordinate systems that needed a missing datum grid, after every command.
self.say_grid_notes();
self.say_unplaced();
self.say_public_only_full();
// A plugin's command waiting for its fetches answers `pending` and runs again when they
// land: logged then, once. (Another command's `pending`, a download the web app makes, is
// logged as it is asked for: nothing runs it again.)
Expand Down Expand Up @@ -3271,6 +3272,7 @@ impl Session {
self.grid_notes_checked = Some(web_time::Instant::now());
self.say_grid_notes();
self.say_unplaced();
self.say_public_only_full();
}
}

Expand All @@ -3283,6 +3285,24 @@ impl Session {
}
}

/// Says once that the table of web addresses held to the internet is full
/// ([`render::rustgis_tiles::cache::take_public_only_full`]): from then on, until RustGIS
/// restarts, an address it has no record of is read only from the internet, so the user's own
/// on this computer or the local network is refused.
fn say_public_only_full(&mut self) {
// A copy run ahead (`requests_into`, desktop only) leaves it for the session that takes
// its results.
#[cfg(not(target_arch = "wasm32"))]
if self.requests_into.is_some() {
return;
}
if render::rustgis_tiles::cache::take_public_only_full() {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
self.warn(
"web addresses: RustGIS has recorded as many addresses that may reach only the internet as it can hold, so until it restarts an address it hasn't seen before is read only from the internet, not this computer or the local network",
);
}
}

/// Says, once for each version of a layer's geometry (and again for a larger count, as when the
/// globe leaves out what a map in the layer's own system drew), that a layer held in another
/// system has features with a place that can't be given in longitude/latitude, which the map
Expand Down
12 changes: 11 additions & 1 deletion crates/engine/src/policy/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,10 @@ impl Session {
} else if decision != Decision::Allow {
return Err("this operation needs your approval".into());
}
// Plugins reach only the internet: so does every command one runs that connects.
if node.effects.contains(super::Effect::Network) {
self.hold_plugin_addresses(&node.params)?;
}
Ok(Arc::new(node))
}
/// Keeps the admitted node and synchronous request predicate through nested execution; restores both on panic.
Expand All @@ -725,7 +729,13 @@ impl Session {
}
let still = continuation.map(|c| Arc::new(move || c.check().is_ok()) as crate::render::rustgis_tiles::cache::Still);
let r = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
crate::render::rustgis_tiles::cache::with_optional_still(still, || f(self))
// Plugins reach only the internet: so does every request a command one runs makes,
// the ones it derives from an address it was given (a listing, a search, a next page)
// and the ones a saved connection sends.
let held = node.effects.contains(super::Effect::Network) && self.plugin_held();
crate::render::rustgis_tiles::cache::with_optional_still(still, || {
crate::render::rustgis_tiles::cache::held_to_public(held, || f(self))
})
}));
let complete =
if let Some(cursor) = &mut self.policy.cursor { cursor.frames.pop().is_none_or(|(n, at)| n.len() == at) } else { true };
Expand Down
110 changes: 110 additions & 0 deletions crates/engine/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19627,6 +19627,8 @@ fn plugin_bridges_cannot_run_another_plugins_tools() {
fn plugin_downloads_are_left_to_the_app() {
let mut s = world();
plugin("eng-url", &["edit", "network"]);
// Its downloads come from this computer (a test server).
fetch_mode(true, true);
let (undo, layers) = (s.undo.len(), s.map().layers.len());
// Nothing answers there: a download that waited fails.
let url = "http://127.0.0.1:9/places.csv";
Expand Down Expand Up @@ -20457,6 +20459,108 @@ fn a_document_a_plugin_supplies_names_only_the_internet() {
rustgis_plugins::unload(id);
}

/// A server on this computer for the commands that take an address: a GeoJSON file and a STAC
/// API's collections, and the paths it was asked for.
fn local_data_server() -> (String, std::sync::Arc<std::sync::Mutex<Vec<String>>>) {
let points = br#"{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"n":1},"geometry":{"type":"Point","coordinates":[1,2]}}]}"#;
let collections = br#"{"collections":[{"id":"scenes","title":"Scenes","links":[]}],"links":[]}"#;
serve_files(vec![("/points.geojson".into(), points.to_vec()), ("/stac/collections".into(), collections.to_vec())])
}

/// Plugins reach only the internet, and so does every command a plugin runs that connects: an
/// address it gives on this computer or the local network is refused before anything is read,
/// naming it and why (the STAC, open data portal, web file, tile and OpenStreetMap commands
/// among them), and nothing is added.
#[test]
fn a_plugin_cannot_name_a_local_address_to_a_command() {
let mut s = world();
let id = "eng-address-local";
plugin(id, &["network", "edit"]);
let (base, asked) = local_data_server();
let lan = "http://192.168.21.4";
let (layers, tiles) = (s.map().layers.len(), s.map().tiles.len());
let cases = [
("stac.collections", json!({"url": format!("{base}/stac")}), format!("{base}/stac")),
("stac.search", json!({"url": format!("{base}/stac"), "collections": ["scenes"], "bbox": [0, 0, 1, 1]}), format!("{base}/stac")),
("stac.addAsset", json!({"url": format!("{base}/stac/item.json")}), format!("{base}/stac/item.json")),
(
"stac.addCube",
json!({"url": format!("{base}/stac"), "collection": "scenes", "asset": "red", "bbox": [0, 0, 1, 1], "start": "2024-01-01", "end": "2024-02-01"}),
format!("{base}/stac"),
),
("portal.search", json!({"portal": "ckan", "url": format!("{lan}/ckan"), "query": "parcels"}), format!("{lan}/ckan")),
(
"portal.files",
json!({"dataset": "0123456789abcdef", "portal": "arcgis-portal", "url": format!("{lan}/portal")}),
format!("{lan}/portal"),
),
("portal.add", json!({"url": format!("{base}/points.geojson")}), format!("{base}/points.geojson")),
("portal.add", json!({"url": format!("{base}/store.zarr"), "use": "zarr"}), format!("{base}/store.zarr")),
("portal.add", json!({"url": "https://data.example.com/points.geojson", "portal": lan}), lan.to_string()),
("layer.addUrl", json!({"url": format!("{base}/points.geojson")}), format!("{base}/points.geojson")),
("map.addTiles", json!({"url": format!("{lan}/tiles/{{z}}/{{x}}/{{y}}.png")}), format!("{lan}/tiles/{{z}}/{{x}}/{{y}}.png")),
(
"osm.download",
json!({"bbox": [1, 2, 1.01, 2.01], "tags": "building", "url": format!("{base}/api/interpreter")}),
format!("{base}/api/interpreter"),
),
];
for (op, p, url) in cases {
let e = forward(&mut s, id, op, p).unwrap_err();
assert!(
e.contains(&url) && e.contains("plugins fetch only from the internet, not this computer or the local network"),
"{op}: {e}"
);
}
assert_eq!(asked.lock().unwrap().as_slice(), &[] as &[String], "nothing was read from this computer");
assert_eq!((s.map().layers.len(), s.map().tiles.len()), (layers, tiles), "nothing was added");
// An address on the internet is taken, and read only from there, wherever its name resolves.
let public = "https://tiles.plugin-named.example/{z}/{x}/{y}.png";
forward(&mut s, id, "map.addTiles", json!({"url": public})).unwrap();
use crate::render::rustgis_tiles::{address::Reach, cache};
assert_eq!(cache::ceiling_for("https://tiles.plugin-named.example/3/4/5.png"), Reach::Public);
rustgis_plugins::unload(id);
}

/// A plugin's command is held to the internet in every request it makes, not only at the address
/// it gives: a bucket it names is listed through the user's connection that serves it, whose
/// endpoint is on this computer, and the listing is refused there, while the user's own listing of
/// it is read.
#[test]
fn a_plugin_lists_a_bucket_only_from_the_internet() {
#[cfg(not(target_arch = "wasm32"))]
if isolate_process_test("tests::a_plugin_lists_a_bucket_only_from_the_internet") {
return;
}
let listing = br#"<?xml version="1.0" encoding="UTF-8"?><ListBucketResult><Name>plugin-held-bucket</Name><Prefix></Prefix><IsTruncated>false</IsTruncated><Contents><Key>a.tif</Key><Size>3</Size></Contents></ListBucketResult>"#;
let base = serve(listing, 1);
let mut s = world();
s.run("s3.connect", &json!({"name": "local-minio", "endpoint": base, "buckets": ["plugin-held-bucket"], "anonymous": true})).unwrap();
let id = "eng-s3-local";
plugin(id, &["network"]);
let e = forward(&mut s, id, "s3.list", json!({"bucket": "plugin-held-bucket"})).unwrap_err();
assert!(e.contains("local network"), "{e}");
let own = s.run("s3.list", &json!({"bucket": "plugin-held-bucket"})).unwrap();
assert_eq!(own["objects"][0]["url"], "s3://plugin-held-bucket/a.tif", "{own}");
rustgis_plugins::unload(id);
}

/// The user's own addresses on this computer are read as ever: only a plugin's are held to the
/// internet.
#[test]
fn the_users_own_local_address_is_still_read() {
let mut s = world();
let (base, asked) = local_data_server();
let added = s.run("layer.addUrl", &json!({"url": format!("{base}/points.geojson"), "name": "Mine"})).unwrap();
assert!(added["layer"].is_u64(), "{added}");
let listed = s.run("stac.collections", &json!({"url": format!("{base}/stac")})).unwrap();
assert_eq!(listed["collections"][0]["id"], "scenes", "{listed}");
s.run("map.addTiles", &json!({"url": format!("{base}/tiles/{{z}}/{{x}}/{{y}}.png"), "name": "Local tiles"})).unwrap();
assert!(s.map().tiles.iter().any(|t| t.name == "Local tiles"));
let asked = asked.lock().unwrap();
assert!(asked.iter().any(|p| p == "/points.geojson") && asked.iter().any(|p| p == "/stac/collections"), "{asked:?}");
}

/// Where nothing may wait (the browser), `host.fetch` answers pending: the command is undone,
/// quietly, and runs again once the answer is in, when the cache answers.
#[test]
Expand Down Expand Up @@ -49295,6 +49399,8 @@ fn a_window_asked_for_the_view_keeps_the_view_it_was_asked_in() {
let (base, _) = serve_ranges(example(1024, 256));
let mut s = world();
plugin("eng-window-view", &["edit", "network"]);
// Its downloads come from this computer (a test server).
fetch_mode(true, true);
let layers = s.map().layers.len();
s.run("map.zoomToExtent", &json!({"extent": [10.3, 45.55, 10.45, 45.7]})).unwrap();
let seen = crate::cmd::workspace::view_extent(&s);
Expand Down Expand Up @@ -49337,6 +49443,8 @@ fn a_plugin_command_runs_again_when_its_window_is_added() {
let (base, _) = serve_ranges(example(1024, 256));
let mut s = world();
plugin("eng-window", &["edit", "network"]);
// Its downloads come from this computer (a test server).
fetch_mode(true, true);
let layers = s.map().layers.len();
let url = format!("{base}/scene.tif");
let bbox = json!([10.25, 45.5, 10.5, 45.75]);
Expand Down Expand Up @@ -51014,6 +51122,8 @@ fn a_plugin_commands_grib_range_is_added_when_the_app_completes_it() {
let (base, _) = serve_ranges(file.clone());
let mut s = world();
plugin("eng-grib-range", &["edit", "network"]);
// Its downloads come from this computer (a test server).
fetch_mode(true, true);
let url = format!("{base}/run/PREC.grb");
let p = json!({"op": "layer.addUrl", "params": {"url": url, "bytes": [88, 175], "name": "Rain"}});
s.run_leaving_downloads("plugin:eng-grib-range/f", &p).unwrap();
Expand Down
Loading
Loading