Fix limit on rule parameters and fix segfault in applyScrobbleRule
For sure this time
This commit is contained in:
parent
18d4df0a5c
commit
01fe10f045
2 changed files with 10 additions and 3 deletions
|
|
@ -61,7 +61,11 @@ pub fn applyScrobbleRule(allocator: std.mem.Allocator, scrobble: Data.ImportedSc
|
|||
},
|
||||
.replace => switch (act.action_on) {
|
||||
inline .album, .track => |on| @field(output_scrobble, @tagName(on)) = act.action_txt,
|
||||
inline .artists_album, .artists_track => |on| @field(output_scrobble, @tagName(on)) = &[_][]const u8{act.action_txt},
|
||||
inline .artists_album, .artists_track => |on| {
|
||||
const artist = try allocator.alloc([]const u8, 1);
|
||||
artist[0] = act.action_txt;
|
||||
@field(output_scrobble, @tagName(on)) = artist;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ pub const jetzig_options = struct {
|
|||
// middleware system.
|
||||
};
|
||||
|
||||
// This is currently the largest number of parameters one can have in a rule
|
||||
pub const max_multipart_form_fields = 42;
|
||||
|
||||
// Maximum bytes to allow in request body.
|
||||
pub const max_bytes_request_body: usize = std.math.pow(usize, 2, 24);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue