Zum Hauptinhalt springen
LIVE
CVSS 6.5CVE-2026-111315 | The Smaily Connect plugin for WordPress is vulnerable to Insecure Direct Object Reference in versions up to, and including, 3.24.0 This is due to the smaily_get_edit_user_id() function reading an attacker-controlled $_GET['user_id'] parameter without performing any ownership or capability check, and then feeding that id into smaily_get_userdata() (which calls get_user_meta()) when rendering the WooCommerce My Account 'edit-account' form via the smaily_print_CVSS 6.4CVE-2026-137713 | Webmin through 2.670 before ae8feb1 allows XSS via an SVG attachment in a mail queue, relevant if an authenticated user uploads an SVG document and an administrator views it.CVSS 6.9CVE-2026-137678 | A security vulnerability has been detected in code-projects Online Job Portal 1.0. Affected by this issue is some unknown functionality of the file Admin/InsertUser.php. Such manipulation of the argument txtUserName/txtPassword leads to sql injection. The attack can be launched remotely. The exploit has been disclosed publicly and may be used.CVSS 5.3CVE-2026-137703 | Flask-AppBuilder before 5.3.1 contains a path traversal vulnerability in ImageManager.save_file that allows authenticated users to write image files outside IMG_UPLOAD_FOLDER via unsanitized multipart filenames. Attackers with add or edit permission on a ModelView with an ImageColumn can upload filenames containing ../ segments to create or overwrite image files like static assets.CVSS 6.1CVE-2026-130039 | The LiteSpeed Cache plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'REQUEST_URI' parameter in all versions up to, and including, 7.9.3 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Successful exploitation requires comments to be open, a comment author name containinCVSS 6.1CVE-2026-136206 | The Export Products, Orders & Customers for WooCommerce plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the 'start_date' parameter in all versions up to, and including, 2.4.3 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link. SucCVSS 9.4CVE-2026-137706 | Smart Portal developed by Direk Tech has a Missing Authorization vulnerability. Authenticated remote attackers can add a specified account to the Active Directory Domain Admins group, thereby obtaining domain administrator privileges.CVSS 8.7CVE-2026-137705 | Smart Portal developed by Direk Tech has an Arbitrary File Read vulnerability.Unauthenticated remote attackers can exploit Relative Path Traversal to download arbitrary system files.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

matten: The core `Tensor`

This is the second of four short posts about matten. The first post explained the motivation. This one shows what the library looks like in practice. Getting…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung

This is the second of four short posts about matten. The first post explained the motivation. This one shows what the library looks like in practice.









Getting started






# Cargo.toml
[dependencies]
matten = "0.28"






The default feature set includes serde, json, and csv. If you want the smallest possible dependency footprint, you can turn them off:




matten = { version = "0.28", default-features = false }









Creating tensors



The whole import is use matten::Tensor;. No generic parameters, no lifetime annotations.




use matten::Tensor;

// From data and an explicit shape
let a = Tensor::new(vec![1.0, 2.0, 3.0, 4.0], &[2, 2]);
assert_eq!(a.shape(), &[2, 2]);
assert_eq!(a.ndim(), 2);

// Convenience constructors
let z = Tensor::zeros(&[3, 3]);
let o = Tensor::ones(&[3, 3]);
let f = Tensor::full(&[2, 4], 5.0);






Shape mismatches produce an actionable error rather than a panic when you use the boundary-style constructor:




use matten::{MattenError, Tensor};

let result = Tensor::try_new(vec![1.0, 2.0, 3.0], &[2, 2]);
assert!(matches!(result, Err(MattenError::Shape { .. })));









Arithmetic and broadcasting



The operators work on references, so you keep ownership of the originals. Shape broadcasting follows NumPy-style right-alignment rules.




use matten::Tensor;

let a = Tensor::new(vec![1.0, 2.0, 3.0, 4.0], &[2, 2]);
let b = Tensor::ones(&[2, 2]);

let c = &a + &b; // [2.0, 3.0, 4.0, 5.0]
let d = &a * 2.0; // scalar broadcast: [2.0, 4.0, 6.0, 8.0]

// Broadcasting a row across a matrix
let row = Tensor::new(vec![1.0, 2.0], &[1, 2]);
let mat = Tensor::ones(&[3, 2]);
let result = &mat + &row; // shape [3, 2]









Shape operations






use matten::Tensor;

let t = Tensor::new(vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0], &[2, 3]);

let flat = t.flatten(); // shape [6]
let reshaped = t.reshape(&[3, 2])?;
let transposed = t.transpose()?; // shape [3, 2]

// Reductions
let s = t.sum(); // scalar
let m = t.mean()?;
let col_sums = t.sum_axis(0)?; // shape [3]









JSON and CSV



Both are on by default. The API returns Result at the boundary, so a malformed input gives you an error rather than a panic.




use matten::Tensor;

// JSON — two accepted forms
let t = Tensor::from_json(r#"{"shape":[2,2],"data":[1.0,2.0,3.0,4.0]}"#)?;
let t = Tensor::from_json("[[1.0, 2.0], [3.0, 4.0]]")?;

// From a file
let t = Tensor::load_json("data/tensor.json")?;

// CSV
let t = Tensor::from_csv("1.0,2.0,3.0\n4.0,5.0,6.0\n")?;
let t = Tensor::load_csv("data/matrix.csv")?;






Serialisation goes through serde, so serde_json::to_string(&t) and serde_json::from_str(&json_str) round-trip correctly when the json or serde feature is active.






Error handling



matten has two deliberate error zones. Internal shape operations (constructing from new, reshaping, slicing) panic with an actionable message — useful during fast prototyping because you see the problem immediately. External boundary operations (from_json, from_csv, load_*) always return Result<Tensor, MattenError>, because real input data is not always clean.



MattenError is #[non_exhaustive], so match on the variant you care about and use a wildcard for the rest:




use matten::{MattenError, Tensor};

match Tensor::from_csv("1.0,not_a_number\n") {
Ok(t) => println!("got shape {:?}", t.shape()),
Err(MattenError::Parse { .. }) => println!("bad input"),
Err(e) => println!("other error: {e:?}"),
}









That covers the everyday numeric core. The next post covers something different:



what happens when the input data is not a clean f64 matrix — when it has mixed types, missing values, or integers alongside floats.



Links: crates.io · docs.rs · mdBook · repository

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Community Rating &amp; Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
41 Quellen
Best Black Friday MacBook Air deals: biggest discounts on Apple's thin and light laptop range
Latest from TechRadar vor 41 Min.
40 weitere Quellen
Latest from TechRadarvor 31 Min.Proton VPN vs ExpressVPN – which secure VPN should you pick this Black Friday? WIREDvor 9 Std.The 108 Best Black Friday Deals Are Now Live: Our Expert Picks for 2026 WIREDvor 37 Min.20 Best Black Friday Tech Deals (2026) WIREDvor 35 Min.The 10 Best Black Friday TV Deals (2026): Save Up to 53% Off Giga.devor 27 Min.Black Friday 2026 bei Back Market: Dyson, Ninja und GoPro jetzt deutlich günstiger Cyber Security Newsvor 1 Std.Black Friday or Black Fraud Day? 7 Cyber Traps to Watch Out for Before You Click ‘Buy’ CNETvor 2 TagenLive: Black Friday Is Here. Shop Our Favorite Deals and Save Up to 60% Apple, Anker, Bose and More WIREDvor 50 Min.22 Best Black Friday Deals Under $100 (2026) WIREDvor 48 Min.Best Black Friday Phone Deals (2026): iPhone, Pixel, and More The Vergevor 55 Min.The absolute best Black Friday deals we’ve found (so far) Giga.devor 48 Min.AirPods Pro 3 im Black-Friday-Sturzflug: So günstig waren Apples Top-In-Ears noch nie PC-WELTvor 46 Min.Black Friday bei Amazon Haul: 20 Prozent Rabatt auf Powerbanks, Batterieprüfer, Speichersticks und mehr PC-WELTvor 46 Min.Black Friday bei Amazon Haul: 20 Prozent Rabatt auf Powerbanks, Batterieprüfer, Speichersticks und mehr t3n.devor 1 Std.Kindle, Echo Dot, Fire TV: Diese neuen Amazon-Geräte sind zum Black Friday stark reduziert Macerkopf.devor 1 Std.Amazon Black Friday Woche: iPad Air, iPhone 18 Cases, AirTag 2, Fire TV Sticks, Echo Dot und mehr appgefahren.devor 1 Std.JMGO mit Black Friday-Deals: Heimkino-Bundles bis zu 60 Prozent günstiger PC-WELTvor 1 Std.Google Pixel 11 jetzt unglaubliche 430 Euro günstiger im Black-Friday-Deal: Tiefstpreis bei Amazon PC-WELTvor 1 Std.Norton 360 Premium-Security an Black Friday nur 19,99 Euro statt 100 Euro Latest from TechRadarvor 1 Std.The best Black Friday headphone deals: Sony, AirPods and more Latest from TechRadarvor 1 Std.Best Black Friday mini PC deals 2026 live: Save on desktops from Apple, Geekom, GMKtec, Minisforum, and more Golem.devor 1 Std.Anzeige: Amazon startet mit Glücksrad-Gewinnspiel in den Black Friday Latest from TechRadarvor 1 Std.These smart and polished backpacks have accompanied me to events all over the world — and they're now 30% for Black Friday PC-WELTvor 1 Std.Riesiger 75 Zoll 4K-QLED-Fernseher fällt bei Amazon auf nur 469 Eur im Black-Friday-Angebot PC-WELTvor 1 Std.Black Friday: Beliebte Mähroboter von Mammotion jetzt ab 599 Euro Latest from TechRadarvor 1 Std.Save up to around £200 on these top mini PCs for Black Friday — with multiple options and configurations available for your exact needs or preferences Caschys Blogvor 3 Std.FlexiSpot Black Friday 2026: Bis zu 40 % Rabatt auf Bestseller bei Amazon Golem.devor 1 Std.Black Friday: Verdi mobilisiert bei Amazon in Gera nur wenige PC-WELTvor 1 Std.Notebooksbilliger Black Friday: 150 Euro Extra-Rabatt – Laptops unter 300 Euro appgefahren.devor 1 Std.tink.de bietet bis zu 50 Euro Extra-Rabatt auf Black-Friday-Angebote PC-WELTvor 1 Std.Notebooksbilliger Black Friday: 150 Euro Extra-Rabatt – Laptops unter 300 Euro Latest from TechRadarvor 2 Std.Which all-in-one Black Friday VPN bundle is really worth it? I compared NordVPN Prime, ExpressVPN Pro, and Proton Unlimited — all under $7 a month — to decide PC-WELTvor 2 Std.Amazon verlost an Black Friday Einkaufsgutscheine im Wert von 2.000 Euro PC-WELTvor 2 Std.Amazon verlost an Black Friday Einkaufsgutscheine im Wert von 2.000 Euro t3n.devor 2 Std.Zum Black Friday bei Ecoflow den Heimspeicher fürs Frühjahr sichern PC-WELTvor 2 Std.Black Friday ist da! Die besten Technik-Deals bei Amazon am 27.11. GamingOnLinux Latest Articl…vor 2 Std.Valve update the Discounts & Events page for Black Friday sales Latest from TechRadarvor 2 Std.I'm an Audio Editor and these are the only cheap hi-fi and headphone deals I want you to see this Black Friday t3n.devor 2 Std.Fritzbox am Black Friday: 9 gute Angebote rund um Router und Repeater PC-WELTvor 2 Std.Black Friday bei Amazon Haul: Bis zu 20 Prozent Rabatt auf Powerbanks, Bosch-Produkte und mehr PC-WELTvor 2 Std.Black Friday bei Amazon Haul: Bis zu 20 Prozent Rabatt auf Powerbanks, Bosch-Produkte und mehr
17 Quellen
Google will soon share Android developers' addresses publicly
Engadget - Technology News & Expert Reviews vor 52 Min.
16 weitere Quellen
VulDB Updatesvor 1 Std.CVE-2026-95429 | Google Android BrEdrDynamicChannel bredr_dynamic_channel.cc resource consumption VulDB Updatesvor 1 Std.CVE-2026-95434 | Google Android LowEnergyScanner low_energy_scanner.cc NotifyPeerFound resource consumption VulDB Updatesvor 1 Std.CVE-2026-95441 | Google Android Bluetooth connection.cc OnDisconnectionComplete denial of service VulDB Updatesvor 1 Std.CVE-2026-95422 | Google Android periodic_advertising_synchronizer.cc OnSyncEstablished assertion VulDB Updatesvor 1 Std.CVE-2026-95423 | Google Android local_service_manager.cc OnWriteCCC null pointer dereference VulDB Updatesvor 1 Std.CVE-2026-95447 | Google Android SDP Client client.cc OnRxFrame memory corruption VulDB Updatesvor 1 Std.CVE-2026-95421 | Google Android Command Processing bredr_signaling_channel.cc DecodeRxUnit use after free VulDB Updatesvor 1 Std.CVE-2026-95435 | Google Android advertising_data.cc FromBytes out-of-bounds VulDB Updatesvor 1 Std.CVE-2026-95446 | Google Android credit_based_flow_control_rx_engine.cc ProcessPdu input validation VulDB Updatesvor 1 Std.CVE-2026-95420 | Google Android Pairing security_manager.cc OnEncryptionChange privileges management VulDB Updatesvor 1 Std.CVE-2026-95419 | Google Android Bluetooth Security Manager security_manager.cc OnPairingRequest unusual condition VulDB Updatesvor 1 Std.CVE-2026-95416 | Google Android Link Encryption Key security_manager.cc OnPairingFailed denial of service VulDB Updatesvor 1 Std.CVE-2026-95415 | Google Android RemoteCharacteristic remote_characteristic.cc denial of service VulDB Updatesvor 1 Std.CVE-2026-95417 | Google Android remote_characteristic.cc ResolvePendingNotifyRequests use after free VulDB Updatesvor 1 Std.CVE-2026-95414 | Google Android http_file_request_handler.cc GetFilePath path traversal VulDB Updatesvor 1 Std.CVE-2026-95418 | Google Android logical_link.cc LogicalLink::SignalError use after free
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten matten: The core `Tensor`

Thematisch verwandte Begriffe: matten, core, Tensor · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag