fix: bound VNC server-announced sizes and only open http(s) links from network data
- The VNC client refuses desktop sizes over 64 Mpx (ServerInit and DesktopSize/ExtendedDesktopSize) and ZRLE rectangles over 64 MiB before allocating, so a hostile server can't force a multi-gigabyte allocation. - Release URLs from the update manifest and repository URLs from the GitHub API are handed to the system opener only when they are http(s) links.
This commit is contained in:
@@ -268,7 +268,11 @@ impl GithubView {
|
||||
});
|
||||
match action {
|
||||
Some(Action::Zip(r)) => self.download(s, &r),
|
||||
Some(Action::Visit(url)) if !url.is_empty() => ui.ctx().open_url(egui::OpenUrl::new_tab(url)),
|
||||
Some(Action::Visit(url)) if !url.is_empty() => {
|
||||
if !widgets::open_web_url(ui.ctx(), &url) {
|
||||
s.error("The repository link is not a web address");
|
||||
}
|
||||
}
|
||||
Some(Action::Copy(url)) => {
|
||||
ui.ctx().copy_text(url);
|
||||
s.info("URL copied");
|
||||
|
||||
Reference in New Issue
Block a user