From f3d4ba9fe5781fac5b5821332297492debc63aa0 Mon Sep 17 00:00:00 2001 From: mycognosist Date: Tue, 14 Jun 2022 09:03:08 +0100 Subject: [PATCH 1/4] url-encode the ssb id for profile buttons --- peach-web/src/routes/scuttlebutt/profile.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/peach-web/src/routes/scuttlebutt/profile.rs b/peach-web/src/routes/scuttlebutt/profile.rs index feecdb7..43875ac 100644 --- a/peach-web/src/routes/scuttlebutt/profile.rs +++ b/peach-web/src/routes/scuttlebutt/profile.rs @@ -83,13 +83,15 @@ fn social_interaction_buttons_template(profile: &Profile) -> Markup { @match (profile.following, &profile.id) { (Some(false), Some(ssb_id)) => { form id="followForm" class="center" action="/scuttlebutt/follow" method="post" { - input type="hidden" id="publicKey" name="public_key" value=(ssb_id); + // url encode the ssb_id value + input type="hidden" id="publicKey" name="public_key" value=(ssb_id.replace('/', "%2F")); input id="followPeer" class="button button-primary center" type="submit" title="Follow Peer" value="Follow"; } }, (Some(true), Some(ssb_id)) => { form id="unfollowForm" class="center" action="/scuttlebutt/unfollow" method="post" { - input type="hidden" id="publicKey" name="public_key" value=(ssb_id); + // url encode the ssb_id value + input type="hidden" id="publicKey" name="public_key" value=(ssb_id.replace('/', "%2F")); input id="unfollowPeer" class="button button-primary center" type="submit" title="Unfollow Peer" value="Unfollow"; } }, @@ -98,13 +100,15 @@ fn social_interaction_buttons_template(profile: &Profile) -> Markup { @match (profile.blocking, &profile.id) { (Some(false), Some(ssb_id)) => { form id="blockForm" class="center" action="/scuttlebutt/block" method="post" { - input type="hidden" id="publicKey" name="public_key" value=(ssb_id); + // url encode the ssb_id value + input type="hidden" id="publicKey" name="public_key" value=(ssb_id.replace('/', "%2F")); input id="blockPeer" class="button button-primary center" type="submit" title="Block Peer" value="Block"; } }, (Some(true), Some(ssb_id)) => { form id="unblockForm" class="center" action="/scuttlebutt/unblock" method="post" { - input type="hidden" id="publicKey" name="public_key" value=(ssb_id); + // url encode the ssb_id value + input type="hidden" id="publicKey" name="public_key" value=(ssb_id.replace('/', "%2F")); input id="unblockPeer" class="button button-primary center" type="submit" title="Unblock Peer" value="Unblock"; } }, @@ -112,7 +116,8 @@ fn social_interaction_buttons_template(profile: &Profile) -> Markup { } @if let Some(ssb_id) = &profile.id { form class="center" { - a id="privateMessage" class="button button-primary center" href={ "/scuttlebutt/private/" (ssb_id) } title="Private Message" { + // url encode the ssb_id + a id="privateMessage" class="button button-primary center" href={ "/scuttlebutt/private/" (ssb_id.replace('/', "%2F")) } title="Private Message" { "Send Private Message" } } From 0923c246932f08d6cc50c04c806b1dddc79259c9 Mon Sep 17 00:00:00 2001 From: mycognosist Date: Tue, 14 Jun 2022 09:03:24 +0100 Subject: [PATCH 2/4] update lockfile --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 32c6254..90ce926 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1111,7 +1111,7 @@ dependencies = [ [[package]] name = "golgi" version = "0.1.1" -source = "git+https://git.coopcloud.tech/golgi-ssb/golgi#0aa616d92b005b38359aa34bf448f3f1f47e8e6a" +source = "git+https://git.coopcloud.tech/golgi-ssb/golgi.git#0aa616d92b005b38359aa34bf448f3f1f47e8e6a" dependencies = [ "async-std", "async-stream 0.3.3", From 216b60b86a9b35192a9ec8ce91ceb203f95922b9 Mon Sep 17 00:00:00 2001 From: glyph Date: Thu, 16 Jun 2022 11:07:44 +0100 Subject: [PATCH 3/4] bump version in manifest --- peach-web/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peach-web/Cargo.toml b/peach-web/Cargo.toml index 11d345b..94a7160 100644 --- a/peach-web/Cargo.toml +++ b/peach-web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peach-web" -version = "0.6.13" +version = "0.6.15" authors = ["Andrew Reid "] edition = "2018" description = "peach-web is a web application which provides a web interface for monitoring and interacting with the PeachCloud device. This allows administration of the single-board computer (ie. Raspberry Pi) running PeachCloud, as well as the ssb-server and related plugins." From 76d5e6a35573b8fb74c8f93283a042058da37c0c Mon Sep 17 00:00:00 2001 From: glyph Date: Thu, 16 Jun 2022 11:19:04 +0100 Subject: [PATCH 4/4] fix probes version --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d91633a..505c83a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1079,7 +1079,7 @@ dependencies = [ [[package]] name = "golgi" version = "0.1.4" -source = "git+https://git.coopcloud.tech/golgi-ssb/golgi.git#ca4c1114ddf328b818144c5a1af0187b1357e9be" +source = "git+https://git.coopcloud.tech/golgi-ssb/golgi#ca4c1114ddf328b818144c5a1af0187b1357e9be" dependencies = [ "async-std", "async-stream 0.3.3", @@ -2405,7 +2405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f77e66f6d6d898cbbd4a09c48fd3507cfc210b7c83055de02a38b5f7a1e6d216" dependencies = [ "libc", - "time 0.3.9", + "time 0.1.44", ] [[package]]