bugGNU nano - Bugs: bug #48622, trying to overwrite an existing...

 
 

bug #48622: trying to overwrite an existing file in restricted mode gives zero feedback

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Mon 25 Jul 2016 11:04:06 AM UTC  
 
Severity: 2 - MinorStatus: Fixed
Assigned to: David Lawrence Ramsey <dolorous>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 29 Nov 2016 11:31:23 AM UTC, comment #4:

Fixed in git, e4d4524. Thanks for the patch. I've tweaked the function name, the comments, and the commit message.

Benno Schulenberg <bens>
Project Administrator
Sun 27 Nov 2016 09:09:36 PM UTC, comment #3:

I wasn't sure what to call it; I went with that because both places it's done are just before prompts.

New patch is attached; I went with statusbar_warn_and_pause() for the new function name.

(file #39085)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Sun 27 Nov 2016 07:57:22 PM UTC, comment #2:

Patch looks good. But I don't like the name 'statusbar_warn_before_prompt', because the function does not prompt, and all warnings happen on the statusbar anyway. Better would be something like 'warn_and_shortly_pause'.

Could you give me a patch with a commit message? One produced with 'git format-patch'.

Benno Schulenberg <bens>
Project Administrator
Sat 26 Nov 2016 10:55:55 PM UTC, comment #1:

The attached patch against current git makes nano display a warning in that case (reusing some existing code).

I'm not sure what to do in the second case, as limiting access to files not specified on the command line seems to be part of restricted mode in general.

(file #39078)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Mon 25 Jul 2016 11:04:06 AM UTC, original submission:

To reproduce, run 'src/nano --restrict', type a few characters, and then type: ^O NEWS <Enter>. Nothing happens, it doesn't beep, it just refuses to do anything and it is unclear why. Type another character (after NEWS, say Y) and press <Enter>. Now it does save the file.

Expected behavior: when the filename exists, it should say so for a second on the statusbar. It should probably beep too.

(After having given the file a name, though, one is no longer allowed to change it. Strange. The user created the file, so should be allowed to give it any name she likes, even multiple ones.)

Benno Schulenberg <bens>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dolorous (Updated the item)
  • -unavailable- added by bens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 13 Dec 2016 11:46:00 AM UTCbensOpen/ClosedOpen=>Closed
    Tue 29 Nov 2016 11:31:23 AM UTCbensStatusIn Progress=>Fixed
    Sun 27 Nov 2016 09:09:36 PM UTCdolorousAttached File-=>Added 0001-files-Give-proper-feedback-when-restricted-mode-prev.patch, #39085
    Sun 27 Nov 2016 07:57:22 PM UTCbensStatusNone=>In Progress
      Assigned toNone=>dolorous
    Sat 26 Nov 2016 10:55:55 PM UTCdolorousAttached File-=>Added nano-overwriterestricted.patch, #39078

    Back to the top


    Powered by Savane 3.1-cleanup1