Skip to content

Commit 95ecf7f

Browse files
authored
Merge branch 'rust-lang:master' into display-errors-instead-of-logging
2 parents 3723a89 + 2b95e18 commit 95ecf7f

File tree

4 files changed

+81
-18
lines changed

4 files changed

+81
-18
lines changed

Diff for: .cargo/audit.toml

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
[advisories]
22
ignore = [
3-
"RUSTSEC-2023-0018", # rustwide -> remove_dir_all,TOCTOU / Race Condition
4-
# https://github.com/rust-lang/docs.rs/issues/2074
5-
6-
"RUSTSEC-2023-0071", # potential key recovery through timing sidechannels
7-
8-
"RUSTSEC-2024-0013", # Memory corruption, denial of service, and arbitrary code execution in libgit2
9-
# https://github.com/rust-lang/docs.rs/issues/2414
3+
"RUSTSEC-2023-0071", # rsa: potential key recovery through timing sidechannels
104

115
"RUSTSEC-2024-0320", # yaml-rust is unmaintained.
126
# https://github.com/rust-lang/docs.rs/issues/2469
137

14-
"RUSTSEC-2024-0363", # sqlx, Binary Protocol Misinterpretation caused by Truncating or Overflowing Cast
15-
# https://github.com/rust-lang/docs.rs/issues/2588
16-
# SECURITY:
17-
# We have plenty of places where user input ends up in sql, for example the inner doc path for doc pages, crate names etc.
18-
# But in all these places, the user content is part of the path of the URL.
19-
# Since URL length is limited by cloudfront, and also by nginx, to something much smaller than 4 GiB, I don't think this issue affects us.
8+
"RUSTSEC-2024-0370", # proc-macro-error is unmaintained
9+
# https://github.com/rust-lang/docs.rs/issues/2595
10+
11+
"RUSTSEC-2025-0007", # `ring` is unmaintained. Not much we can do about it.
12+
# https://github.com/rust-lang/docs.rs/issues/2741
2013
]
2114
informational_warnings = ["unmaintained"] # warn for categories of informational advisories
2215
severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical")

Diff for: Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/web/releases.rs

+66-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ impl ReleaseType {
318318
match self {
319319
Self::Recent => "recent",
320320
Self::Stars => "stars",
321-
Self::RecentFailures => "recent_failures",
321+
Self::RecentFailures => "recent-failures",
322322
Self::Failures => "failures",
323323
Self::Search => "search",
324324
}
@@ -2184,4 +2184,69 @@ mod tests {
21842184
Ok(())
21852185
})
21862186
}
2187+
2188+
#[test]
2189+
fn recent_failures_correct_pagination_links() {
2190+
async_wrapper(|env| async move {
2191+
for i in 0..RELEASES_IN_RELEASES + 1 {
2192+
env.fake_release()
2193+
.await
2194+
.name("failed")
2195+
.version(&format!("0.0.{}", i))
2196+
.build_result_failed()
2197+
.create()
2198+
.await?;
2199+
}
2200+
2201+
let web = env.web_app().await;
2202+
2203+
let response = web.get("/releases/recent-failures").await?;
2204+
assert!(response.status().is_success());
2205+
2206+
let page = kuchikiki::parse_html().one(response.text().await?);
2207+
assert_eq!(
2208+
page.select("div.description")
2209+
.unwrap()
2210+
.next()
2211+
.unwrap()
2212+
.text_contents(),
2213+
"Recent crates failed to build"
2214+
);
2215+
2216+
let next_page_link = page.select("div.pagination > a").unwrap().next().unwrap();
2217+
assert_eq!(next_page_link.text_contents().trim(), "Next Page");
2218+
2219+
let next_page_url = next_page_link
2220+
.attributes
2221+
.borrow()
2222+
.get("href")
2223+
.unwrap()
2224+
.to_owned();
2225+
assert_eq!(next_page_url, "/releases/recent-failures/2");
2226+
2227+
let response = web.get(&next_page_url).await?;
2228+
assert!(response.status().is_success());
2229+
2230+
let page = kuchikiki::parse_html().one(response.text().await?);
2231+
assert_eq!(
2232+
page.select("div.description")
2233+
.unwrap()
2234+
.next()
2235+
.unwrap()
2236+
.text_contents(),
2237+
"Recent crates failed to build"
2238+
);
2239+
assert_eq!(
2240+
page.select(".recent-releases-container > ul > li .name")
2241+
.unwrap()
2242+
.next()
2243+
.unwrap()
2244+
.text_contents()
2245+
.trim(),
2246+
"failed-0.0.0"
2247+
);
2248+
2249+
Ok(())
2250+
});
2251+
}
21872252
}

Diff for: templates/core/about/redirections.html

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ <h1>Shorthand URLs</h1>
2727
<td>Latest version of clap</td>
2828
</tr>
2929

30+
<tr>
31+
<td><a href="https://docs.rs/clap::Command">docs.rs/clap::Command</a></td>
32+
<td>Latest version of clap, and search for "Command" within the crate</td>
33+
</tr>
34+
3035
<tr>
3136
<td>
3237
<a href="https://docs.rs/clap/%7E2">docs.rs/clap/~2</a>

0 commit comments

Comments
 (0)