summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
2022-07-13LibJS+js: Parse new constructor options from Intl.NumberFormat V3Timothy Flynn
This contains minimal changes to parse newly added and modified options from the Intl.NumberFormat V3 proposal, while maintaining main spec behavior in Intl.NumberFormat.prototype.format. The parsed options are reflected only in Intl.NumberFormat.prototype.resolvedOptions and the js REPL.
2022-07-12AK+Userland+Tests: Remove URL(char const*) constructorsin-ack
The StringView(char const*) constructor is being removed, and there was only a few users of this left, which are also cleaned up in this commit.
2022-07-12Everywhere: Use default StringView constructor over nullptrsin-ack
While null StringViews are just as bad, these prevent the removal of StringView(char const*) as that constructor accepts a nullptr. No functional changes.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Split Error::from_string_literal and Error::from_string_viewsin-ack
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-07-12Userland: Remove erroneous String -> char* -> StringView conversionssin-ack
These were accidental (or leftover) uses of String::characters() to construct StringViews through its StringView(char const*) constructor. Since this constructor is due to be removed, this will no longer work. Plus this prevents strlen from being run on these strings unnecessarily.
2022-07-12Userland: Convert command line arguments to String/StringViewsin-ack
StringView was used where possible. Some utilities still use libc functions which expect null-terminated strings, so String objects were used there instead.
2022-07-10js: Add missing built-in functions to help() outputLinus Groh
2022-07-10js: Remove load() built-in functionLinus Groh
This is no longer needed now that we have ES modules.
2022-07-09LibCore+Userland: Use StringViews when calling Core::System::openkleines Filmröllchen
For some reason we used raw char pointers sometimes, which caused at least one heap buffer overflow detected in fuzzing.
2022-07-09route: Support removing entries with unknown gatewayMaciej
2022-07-08Kernel: Implement an `axallowed` mount optionTim Schumacher
Similar to `W^X` and `wxallowed`, this allows for anonymous executable mappings.
2022-07-08mount: Allow extending `fstab` via drop-in files in `fstab.d`Tim Schumacher
2022-07-08mount: Separate mounting by line into a new functionTim Schumacher
2022-07-06LibJS: Revert partial resizable ArrayBuffer implementationLinus Groh
This is a manual but clean revert of all commits from #12595. Adding a partial implementation of the resizable ArrayBuffer proposal without implementing all the updates to TypedArray infrastructure that is also covered by the spec introduced a bunch of crashes, so we decided to revert it for now until a full implementation is completed.
2022-07-06AK: Use an enum instead of a bool for String::replace(all_occurences)DexesTTP
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
2022-07-02unzip: Remove the arbitrary file size limitTim Schumacher
Not being able to map the file chunk-by-chunk feels like a deficit of MappedFile and/or LibArchive, so it's weird that `unzip` is enforcing this size limit, and an especially arbitary one at that. Since "replace one error message with another error message" is the best possible outcome here, and making the user pass a useless flag in cases where it may not even be needed is the worst, let's just remove that file size limit. However, the `FIXME` about mapping files partially is left in because this is something that we definitely want to take a look at in the future.
2022-07-01js: Implement pretty-printing of WeakRef objectsLinus Groh
2022-07-01js: Implement pretty-printing of WeakSet objectsLinus Groh
2022-07-01js: Implement pretty-printing of WeakMap objectsLinus Groh
2022-07-01js: Fix pretty-printing of primitive wrapper objectsLinus Groh
Currently, they print `[Type] <already printed Object 0x...>` as, for some reason, we were simply trying to print the object again.
2022-07-01js: Prefix global variables with 'g_'Linus Groh
This makes it much clearer that they are, in fact, global variables. Also avoids name shadowing issues, especially with 'vm'.
2022-07-01js: Fix a couple of const correctness issuesLinus Groh
2022-07-01js: Move static_cast responsibility out of the pretty-print functionsLinus Groh
This is something the caller should do.
2022-07-01js: Implement pretty-printing of Intl.DurationFormatIdan Horowitz
2022-06-30Everywhere: Use my fairly new and shiny serenityos.org email :^)Kenneth Myhra
2022-06-28pls: Implement support for `--preserve-env`Tim Schumacher
2022-06-28pls: Don't rely on `getenv` to find `TERM`Tim Schumacher
This allows us to skip storing the actual backing data in a separate `Vector`, as we know that we are working with `environ`-backed storage here. Also, while the logic is currently very similar to what `getenv` does internally, this allows us to eventually implement custom environment variable filters while remaining linear in run time.
2022-06-28ln: Fix typo in `arguments` argumentMaciej
2022-06-27Browser+LibWeb+WebContent: Allow Browser to load local filesLucas CHOLLET
To achieve this goal: - The Browser unveils "/tmp/portal/filesystemaccess" - Pass the page through LoadRequest => ResourceLoader - ResourceLoader requests a file to the FileSystemAccessServer via IPC - OutOfProcessWebView handles it and sends a file descriptor back to the Page.
2022-06-16Keymap: Fix switching selected keymapPaweł Łukasik
Previously keymap did switching of the selected keymap twice when the command was executed. First set it to the first keymap on the list and later, if present, to the chosen one. Currently the switching to the first keymap on the list is done only when the selection is not present or it's not on the list of keymaps.
2022-06-15Utilities: Remove `ddate` joke programAndreas Kling
2022-06-13AK/ByteBuffer+Everywhere: Handle errors in ByteBuffer::slice()Matthias Zimmerman
2022-06-06js: Add a loadINI() function for loading INI files :^)Linus Groh
This works the same way as loadJSON, except it loads INI files and always returns an object.
2022-06-06tar: Implement support for GNU longname headersTim Schumacher
2022-06-03js: Create throw completions instead of raw error values on SyntaxErrorIdan Horowitz
This ensures that js's error printing logic is used instead of the generic value printing logic, which then lets eshost correctly parse thrown SyntaxErrors using the normal LibJS exception format.
2022-06-02lsusb: Add `-v` flag to `lsusb` :^)Jesse Buhagiar
We can now get a more verbose print out from `lsusb` that spits out all of the devices descriptors :^)
2022-05-29Utilities: Add networking to headless-browserDexesTTP
With this, the headless browser can now connect to the web. Thanks a lot to Ali and Sin-ack for their help with this! Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org> Co-authored-by: sin-ack <sin-ack@users.noreply.github.com>
2022-05-29Utilities: Add image decoding to headless-browserDexesTTP
With this, the headless browser can now decode images on its own!
2022-05-29Utilities: Add a simple headless-browserDexesTTP
This utility creates a 'screenshot' of the given page after a few seconds of loading.
2022-05-29lscpu: Show size of L1 data/instruction, L2, and L3 CPU cachesLinus Groh
2022-05-27Utilities: Add edid-dump program to dump EDID from Display connectorsLiav A
2022-05-26netstat: Stop needing LookupServer for parsing argumentsMaciej
Previously the netstat utility crashed when LookupServer wasn't running because it tried to unveil nonexistent /tmp/portal/lookup socket. This commit fixes that.
2022-05-26route: Add the flags columnbrapru
2022-05-23Meta+Userland: Add jakt as an optional Lagom ToolAndrew Kaster
We can now use ENABLE_JAKT to pull jakt as a host tool and use it to pre-process .jakt files into .cpp files for use in serenity applications
2022-05-21touch: Support custom timestampsAriel Don
Previously, `touch` remained limited to creating files and updating their current access and modifications time to the current time. It's now capable of accepting two different timestamp formats with flags `-d` and `-t` and referencing timestamps of other files with flag `-r`. `touch` can also update only the last access time with `-a`, only the last access time with `-m`, or update both as usual. `touch` updates both left unspecified. With `-c`, `touch` does not create a file if it doesn't already exist.
2022-05-08xml: Avoid UAF in Error return from serenity_main()Ali Mohammad Pur
ErrorOr<int> cannot own a string, and the string is scrubbed when freed, so we'd get garbage when errors were printed.
2022-05-07LibELF: Name library maps with the full file pathTim Schumacher