mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
misc 0.3.4 bugfixes (#2193)
* display message not object on login page * more release notes * fix firefox ssl issue * fix no pubkey error * Fix/missing main (#2194) fix: Main during migration --------- Co-authored-by: Aiden McClelland <me@drbonez.dev> Co-authored-by: J H <2364004+Blu-J@users.noreply.github.com>
This commit is contained in:
@@ -398,7 +398,11 @@ pub async fn reset_password(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[command(rename = "get-pubkey", display(display_none))]
|
#[command(
|
||||||
|
rename = "get-pubkey",
|
||||||
|
display(display_none),
|
||||||
|
metadata(authenticated = false)
|
||||||
|
)]
|
||||||
#[instrument(skip(ctx))]
|
#[instrument(skip(ctx))]
|
||||||
pub async fn get_pubkey(#[context] ctx: RpcContext) -> Result<Jwk, RpcError> {
|
pub async fn get_pubkey(#[context] ctx: RpcContext) -> Result<Jwk, RpcError> {
|
||||||
let secret = ctx.as_ref().clone();
|
let secret = ctx.as_ref().clone();
|
||||||
|
|||||||
@@ -269,24 +269,46 @@ pub fn make_int_cert(
|
|||||||
Ok(cert)
|
Ok(cert)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
|
pub enum MaybeWildcard {
|
||||||
|
WithWildcard(String),
|
||||||
|
WithoutWildcard(String),
|
||||||
|
}
|
||||||
|
impl MaybeWildcard {
|
||||||
|
pub fn as_str(&self) -> &str {
|
||||||
|
match self {
|
||||||
|
MaybeWildcard::WithWildcard(s) => s.as_str(),
|
||||||
|
MaybeWildcard::WithoutWildcard(s) => s.as_str(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl std::fmt::Display for MaybeWildcard {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
MaybeWildcard::WithWildcard(dns) => write!(f, "DNS:{dns},DNS:*.{dns}"),
|
||||||
|
MaybeWildcard::WithoutWildcard(dns) => write!(f, "DNS:{dns}"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct SANInfo {
|
pub struct SANInfo {
|
||||||
pub dns: BTreeSet<String>,
|
pub dns: BTreeSet<MaybeWildcard>,
|
||||||
pub ips: BTreeSet<IpAddr>,
|
pub ips: BTreeSet<IpAddr>,
|
||||||
}
|
}
|
||||||
impl SANInfo {
|
impl SANInfo {
|
||||||
pub fn new(key: &Key, hostname: &Hostname, ips: BTreeSet<IpAddr>) -> Self {
|
pub fn new(key: &Key, hostname: &Hostname, ips: BTreeSet<IpAddr>) -> Self {
|
||||||
let mut dns = BTreeSet::new();
|
let mut dns = BTreeSet::new();
|
||||||
if let Some((id, _)) = key.interface() {
|
if let Some((id, _)) = key.interface() {
|
||||||
dns.insert(format!("{id}.embassy"));
|
dns.insert(MaybeWildcard::WithWildcard(format!("{id}.embassy")));
|
||||||
dns.insert(key.local_address().to_string());
|
dns.insert(MaybeWildcard::WithWildcard(key.local_address().to_string()));
|
||||||
} else {
|
} else {
|
||||||
dns.insert("embassy".to_owned());
|
dns.insert(MaybeWildcard::WithoutWildcard("embassy".to_owned()));
|
||||||
dns.insert(hostname.local_domain_name());
|
dns.insert(MaybeWildcard::WithWildcard(hostname.local_domain_name()));
|
||||||
dns.insert(hostname.no_dot_host_name());
|
dns.insert(MaybeWildcard::WithoutWildcard(hostname.no_dot_host_name()));
|
||||||
dns.insert("localhost".to_owned());
|
dns.insert(MaybeWildcard::WithoutWildcard("localhost".to_owned()));
|
||||||
}
|
}
|
||||||
dns.insert(key.tor_address().to_string());
|
dns.insert(MaybeWildcard::WithWildcard(key.tor_address().to_string()));
|
||||||
Self { dns, ips }
|
Self { dns, ips }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,7 +358,7 @@ pub fn make_leaf_cert(
|
|||||||
.1
|
.1
|
||||||
.dns
|
.dns
|
||||||
.first()
|
.first()
|
||||||
.map(String::as_str)
|
.map(MaybeWildcard::as_str)
|
||||||
.unwrap_or("localhost"),
|
.unwrap_or("localhost"),
|
||||||
)?;
|
)?;
|
||||||
subject_name_builder.append_entry_by_text("O", "Start9")?;
|
subject_name_builder.append_entry_by_text("O", "Start9")?;
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ impl VersionT for Version {
|
|||||||
let parsed_url = Some(COMMUNITY_URL.parse().unwrap());
|
let parsed_url = Some(COMMUNITY_URL.parse().unwrap());
|
||||||
let mut ui = crate::db::DatabaseModel::new().ui().get_mut(db).await?;
|
let mut ui = crate::db::DatabaseModel::new().ui().get_mut(db).await?;
|
||||||
ui["marketplace"]["known-hosts"][COMMUNITY_URL] = json!({});
|
ui["marketplace"]["known-hosts"][COMMUNITY_URL] = json!({});
|
||||||
|
ui["marketplace"]["known-hosts"][MAIN_REGISTRY] = json!({});
|
||||||
for package_id in crate::db::DatabaseModel::new()
|
for package_id in crate::db::DatabaseModel::new()
|
||||||
.package_data()
|
.package_data()
|
||||||
.keys(db)
|
.keys(db)
|
||||||
@@ -139,6 +140,7 @@ impl VersionT for Version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui["marketplace"]["known-hosts"][COMMUNITY_URL].take();
|
ui["marketplace"]["known-hosts"][COMMUNITY_URL].take();
|
||||||
|
ui["marketplace"]["known-hosts"][MAIN_REGISTRY].take();
|
||||||
ui.save(db).await?;
|
ui.save(db).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,11 @@
|
|||||||
<li>Security patches</li>
|
<li>Security patches</li>
|
||||||
<li>Bug fixes</li>
|
<li>Bug fixes</li>
|
||||||
<li>Breakout services to Community Registry</li>
|
<li>Breakout services to Community Registry</li>
|
||||||
|
<li>SSL support for IP access</li>
|
||||||
<li>UI display improvements</li>
|
<li>UI display improvements</li>
|
||||||
<li>Better logs</li>
|
<li>Better logs</li>
|
||||||
<li>New system metrics</li>
|
<li>New system metrics</li>
|
||||||
|
<li>EFI support</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="ion-text-center ion-padding">
|
<div class="ion-text-center ion-padding">
|
||||||
<ion-button
|
<ion-button
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export class LoginPage {
|
|||||||
try {
|
try {
|
||||||
await this.api.getPubKey()
|
await this.api.getPubKey()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this.error = e
|
this.error = e.message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user