xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 3 months ago

#2137 closed defect (worksforme)

window resizing should not be allowed under readonly mode

Reported by: thiner Owned by: thiner
Priority: major Milestone: 3.0
Component: core Version: 2.4.x
Keywords: readonly dimension Cc:

Description

From #2136

Logic problem: Under --readonly=yes mode, the window is resizable and resizing of window CHANGED the desktop dimension of server.

To replicate the problem: Open two clients (--sharing=yes), one with readonly=yes. Resize the --readonly=yes window, the other window also has its size changed.

I am not very familiar with ACL of xpra since I have known it for no more than several hours (:p), and I am not sure whether --readonly=yes is security critical. Anyway this can be deemed as a bug.

Change History (5)

comment:1 Changed 6 months ago by Antoine Martin

Milestone: 2.53.0
Status: newassigned

the window is resizable and resizing of window CHANGED the desktop dimension of server

I assume you mean that the server-side window got resized, and this is then propagated to the other client. The desktop dimension of the server (the xvfb size) is not affected by window resizing.

We need to:

  • server should probably tell the client it is running in readonly mode rather try to cook all the window size-constraint metadata packets
  • client should make all windows non-resizable in readonly mode - bearing in mind that this may affect their appearance (removing handles, removing buttons from the title bar, etc)
  • reject the move and resize part of configure packets from the client when in readonly mode - but still keep track of where the client has mapped the window (since we can't prevent the client OS from moving windows)
  • some client-side window managers may still force resize the window... in this case, not sure what to do

comment:2 in reply to:  1 Changed 6 months ago by thiner

A readonly client can just be forced to open a flag fit-to-window where all resizing of window only scale the client side view, rather than resizing the master window. :D

Last edited 6 months ago by Antoine Martin (previous) (diff)

comment:3 Changed 6 months ago by Antoine Martin

Summary: Under --readonly screen resizing changed server resolutionwindow resizing should not be allowed under readonly mode

A readonly client can just be forced to open a flag fit-to-window where all resizing of window only scale the client side view, rather than resizing the master window. :D

What you describe here is the same as your other ticket: #2136
Now I realize that the same applies to this ticket and that you are also using "shadow" or "start-desktop" here.

So when I said:

The desktop dimension of the server (the xvfb size) is not affected by window resizing.

That is not true of "start-desktop" servers, where we do resize the xvfb size to match the client's window size.

And this one is actually easier to solve for desktop mode.

comment:4 Changed 4 months ago by Antoine Martin

Owner: changed from Antoine Martin to thiner
Status: assignednew
  • r22524 enforce the readonly flag server-side: clients are told the windows are fixed size and requests to resize them are ignored
  • r22525 does the same thing client-side, r22527 plugs some holes

The problem with the client side is that window managers are free to ignore the hints we give them.. We try our best, but this is going to be very hard to get working perfectly.

@thiner: does that work well enough for you?

comment:5 Changed 3 months ago by Antoine Martin

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.