Commit graph

45024 commits

Author SHA1 Message Date
Lucas CHOLLET
ebe925b7c0 userdel: Use Core::Account::sync() to interact with sensitive files 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
945d2079b4 LibCore: Add a deleted state for Account
As other setters, this only affect the in-memory copy, you need to call
`sync()` to apply changes.
2022-12-31 04:24:05 -07:00
Lucas CHOLLET
f000193ee5 LibCore: Deduplicate some code in Account::generate_shadow_file() 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
3c76790d51 userdel: Use Core::File::remove() instead of spawning /bin/rm 2022-12-31 04:24:05 -07:00
implicitfield
d49fccf0d5 ThemeEditor: Support editing color schemes 2022-12-31 04:20:59 -07:00
implicitfield
1a68977457 Flood: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
800c292be8 Terminal+LibVT: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
8eb402f8e5 LibGfx: Support color schemes 2022-12-31 04:20:59 -07:00
implicitfield
05334169cf Themes: Add color schemes to all themes 2022-12-31 04:20:59 -07:00
implicitfield
4aec8491d6 Everywhere: Move Base/res/terminal-colors to Base/res/color-schemes 2022-12-31 04:20:59 -07:00
Tim Schumacher
534f3faa2f Ports: Bump the xash3d versions across the board 2022-12-31 04:16:57 -07:00
Tim Schumacher
83f6d5b26a LibELF: Warn if resolving a library resulted in a relative path 2022-12-31 04:16:57 -07:00
Luke Wilde
1011067a60 LibWeb: Stub HTMLInputElement.setSelectionRange
Required by Twitter to move the input caret of the 2FA <input> element
to the start. However, we don't currently handle individual <input>
element selections.
2022-12-30 21:56:54 -05:00
Luke Wilde
6d188d72c0 LibWeb: Store cookies for every HTTP response
As per Fetch, we are supposed to store cookies from Set-Cookie as soon
as we receive response headers for any HTTP response, even in error
cases.

Required by Twitter to login, as it sets cookies via XHR.
2022-12-30 21:56:54 -05:00
Arda Cinar
c9d434247d LibMarkdown: Indent blockquotes inside the terminal renderer
This removes one FIXME :^)
2022-12-31 00:09:23 +01:00
Arda Cinar
5cc984d74c LibMarkdown: Render lines to terminal instead of a single string
With this patch, the blocks in a markdown document render a vector of
lines. These lines get concatenated in Document::render_to_terminal, so
this does not change any external APIs of LibMarkdown.

This change makes it possible to indent individual lines in the rendered
markdown. So, rendering blockquotes in a similar way to code blocks :^)
2022-12-31 00:09:23 +01:00
Aayush
7a4b912ece LibGUI: Fix invalid ModelIndices during shift-click multiselection
Previously, If the widget was unfocused, the selection start index
would be invalid. This would result in invalid selections when doing
shift+click on the widget (while it is unfocused).

Now, we reassign the selection start index to current index
before we initiate multiselection, if selection start index is invalid.

Should Fix SerenityOS#11999 and the same bug inside FileManager.
2022-12-31 00:08:35 +01:00
Alex Chronopoulos
5f67d002a2 LibAudio: Prevent int overflow in the user buffer queue
The `UserSampleQueue::remaining_samples` calculates the result by
subtracting two unsigned int numbers. That can lead to integer overflow.
Add an assert to verify that the minuend is greater or equal to the
subtrahend.
2022-12-31 00:08:05 +01:00
Karol Baraniecki
451ae985bf Calculator: Add adding/subtracting/multiplying/dividing by a percentage
It's now possible to easily calculate 50% of 50. :^)
2022-12-31 00:07:13 +01:00
Karol Baraniecki
21cc8f65f5 Calculator: Support chaining and repeating operations
The calculator now supports chaining (hitting "1+2+3=" shows "6"
instead of "5") and repeating ("2+2===" shows "8") operations. :^)
2022-12-31 00:07:13 +01:00
Karol Baraniecki
ef9fd6c286 Calculator: Fix which digits get animated when pressing keyboard keys
Previously every digit press would appear like "0" was pressed on the
keypad.
2022-12-31 00:07:13 +01:00
BodilessSleeper
c65df44eee LibJS: Fix spec link and spec comment in PlainYearMonth 2022-12-31 00:05:20 +01:00
BodilessSleeper
84db0c8dbf LibJS: Remove call to ToPositiveInteger after CalendarDaysInMonth
Implements: tc39/proposal-temporal@261692a

In order to remove the call to to_positive_integer() there neeeded
to be a change of return type from ThrowCompletionOr<Value> to
ThrowCompletionOr<double>.
This is one of the changes that will come anyways with the following
commit: tc39/proposal-temporal@11aad40. :^)
2022-12-31 00:05:20 +01:00
Andrew Kaster
86995be111 LibAudio: Tolerate a file sample rate lower than the AudioServer's
Previously, trying to load a wav file in aplay or SoundPlayer with a
sample rate less than 44100 would crash in an assertion failure trying
to unchecked_append to a vector that was not resized properly.
2022-12-31 00:04:34 +01:00
Andrew Kaster
140000f37a LibAudio: Only join the background enqueuer thread if has been started
This prevent an assertion failure in SoundPlayer when closing it before
trying to play any audio files.
2022-12-31 00:04:34 +01:00
Andrew Kaster
18c559b0e3 SoundPlayer: Pledge proc so that we can actually open audio files 2022-12-31 00:04:34 +01:00
HawDevelopment
a5dfd5eeb6 Utilities: Fix top utility not calling exit() on SIGINT
Before, when running top, pressing Control+C (triggering SIGINT),
would not call the atexit handler. Therefor not restoring stdin.
2022-12-31 00:04:19 +01:00
Jan200101
058a39c6fc Ports: Use absolute path of script
The relative paths are not valid inside a port build directory.
This makes target_env source .hosted_defs.sh correctly.
2022-12-31 00:02:41 +01:00
Luke Wilde
b85f4ab66a Ladybird: Tell Qt that we manually handle the Cookie header
In some cases, Qt would silently drop the Cookie header and start
causing Cookie authenticated requests to start failing.
2022-12-30 23:52:09 +01:00
Liav A
e598f22768 Kernel: Disallow executing SUID binaries if process is jailed
Check if the process we are currently running is in a jail, and if that
is the case, fail early with the EPERM error code.

Also, as Brian noted, we should also disallow attaching to a jail in
case of already running within a setid executable, as this leaves the
user with false thinking of being secure (because you can't exec new
setid binaries), but the current program is still marked setid, which
means that at the very least we gained permissions while we didn't
expect it, so let's block it.
2022-12-30 15:49:37 -05:00
Xexxa
0e010790a4 Base: Add more emoji
🧑‍🍳 - U+1F9D1 U+200D U+1F373 COOK
🥷 - U+1F977 NINJA
💒 - U+1F492 WEDDING
 - U+27BF DOUBLE CURLY LOOP
2022-12-30 15:32:21 -05:00
kleines Filmröllchen
5ab9a9cb03 Toolchain: Fix aarch64 toolchain GDB build
We just need to pass -disable-werror, otherwise Clang will complain a
lot.
2022-12-30 15:31:04 -05:00
Nico Weber
e771320179 pro: Fix comment typo 2022-12-30 15:25:03 -05:00
Nico Weber
ca4ebf5d1b icc: Print rendering intent 2022-12-30 17:21:57 +01:00
Nico Weber
743e9fc786 LibGfx: Read rendering intent from ICCProfile header 2022-12-30 17:21:57 +01:00
Nico Weber
ac039d93f0 Ladybird: Fix typos 2022-12-30 17:21:57 +01:00
Karol Kosek
70885a3dee LibGUI: Automatically scroll to a new column on adding it in ColumnsView 2022-12-30 17:16:29 +01:00
Karol Kosek
35e3df7f13 LibGUI: Teach ColumnsView where indexes are placed (and scroll to them)
This makes the view to scroll when pressing arrow keys! :^)
2022-12-30 17:16:29 +01:00
Karol Kosek
7e52daa542 LibGUI: Don't destroy columns after selecting already opened one 2022-12-30 17:16:29 +01:00
Karol Kosek
e673fc4183 LibGUI: Determine model index from a content position in ColumnsView
We didn't take the scroll value into account when we were converting
a position to an index, which basically prevented us from selecting a
desired file if a list wasn't small enough to fit entirely in the widget
box.
2022-12-30 17:16:29 +01:00
Karol Kosek
e40726cb34 LibGUI: Don't show last separator in column 2022-12-30 17:16:29 +01:00
Karol Kosek
3b18858bb1 LibGUI: Replace a magic number with ColumnsView::column_separator_width 2022-12-30 17:16:29 +01:00
kleines Filmröllchen
7919fb8cae LibC: Mark fenv-family function arguments as used on aarch64
This makes LibC build under aarch64 Clang.
2022-12-30 08:32:46 -07:00
kleines Filmröllchen
5d00e21852 Kernel/aarch64: Implement wait_cycles as a pause loop
The hand-written assembly does not compile under Clang due to register
size mismatches. Using a loop is slower (~6 instructions on O2 as
opposed to 2 with hand-written assembly), but using the pause
instruction makes this more efficient even under TCG.
2022-12-30 08:32:46 -07:00
kleines Filmröllchen
984348ed0d Kernel/aarch64: Implement Processor::pause and Processor::wait_check
For pause we use isb sy which will put the processor to sleep while the
pipeline is being flushed. This instruction is also used by Rust in spin
loops and found to be more efficient, as well as being a rough
equivalent to the x86 pause instruction which we also use here.

For wait_check we use yield, which is a hinted nop that is faster to
execute, and I leave a FIXME for processing SMP messages once we support
SMP.

These two changes probably make spin loops work on aarch64 :^)
2022-12-30 08:32:46 -07:00
kleines Filmröllchen
4d475588bb Kernel/aarch64: Declare TrapFrame as struct
Clang doesn't like misdeclaring classes and structs.
2022-12-30 08:32:46 -07:00
Nico Weber
b7a627ab06 icc: Print data color space 2022-12-30 10:14:22 -05:00
Nico Weber
eaf1f67bb1 LibGfx: Read data color space from ICCProfile header 2022-12-30 10:14:22 -05:00
Nico Weber
7bb4cd74b8 LibWeb: Fix a (charming) comment typo 2022-12-30 10:14:22 -05:00
Ravi J
3a31f37b3d MouseSettings: Update "switch buttons" icon to reflect checkbox state
Using an additional "right button" variant of the graphic, it now
updates the icon based on the user's preference of primary button.
2022-12-30 09:20:42 -05:00