$ git show commit 367fadac24f24b826820e2fadced34b21cfff9ef Merge: 4348cea d0105f1 Author: epriestley <git@epriestley.com> Date: Sat Oct 3 05:09:03 2015 -0700
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Oct 13 2015
Oct 12 2015
Can you show me the output of these commands on the server?
Oct 9 2015
Oct 7 2015
Sep 29 2015
I forgot about that. The Windows
mode
command will return the words such as "Columns" per the locale of Windows. So looking for literally "Columns" will only work for the English Windows locales.
Sep 28 2015
As for the regex note that I am not the author of it,as stated in my comment above(maybe it has been overlooked because i didn't say that clearly),i have just taken it from stackoverflow(if that's ok) to provide a solution for this task as it seemed to be straightforward.As you said this regex looks really weird,I for myself would't even be able to form such an regex,but I am able to explain roughly in detail.
So mode contains in my case 2 blocks,one with sth others and the other with the headline containng CON,this regex looks for the first appearance of CON followed by an arbitary number of any characters following a : .As you have pointed it's better to use the con directly via mode con,i have added a patch that does it.The : is follwed by a sequence marked by ( ),this sequence is detected when a line break(\n occurs) followed by an arbitary number of characters without |,so every time a line break occurs it will trigger that sequence.THe 3 in the { specifies how many times this sequence should match in the text before the regex engine proceeds with the next statement(I bet you're aware of this),which is (?<cols>\d+).
I guess ?<cols> is to copy the matched contents of this sequence in to the key with cols in $matches,so it's redundant as basically every sequence marked with( is accessible by a number as key.The \d stands for digits,so as soon as the regex engine encounters a non-digit,it will abort.
"I see" said the blind man as he tripped over his code.
My suggestion was regarding the
`mode`
changing to
`mode con`
Which will limit the output of the mode command to only include the keyboard/console device, rather than running a blanket mode that returns status for all devices, then relying on the regex to locate the CON. I suggested this as a way that might reduce the complexity of the regex.
+1 vote from me to comment the use of regular expressions (how can anything that looks like this "'/CON.*:(\n[^|]+?){3}(?<cols>\d+)/" be called regular?)
Sep 26 2015
If you submit this as a differential revision it will give a better interface for others to review and discuss the suggested change.
I think my suggested code from stackoverflow for Windows behaves like its unix counterpart,as it outputs the same numberm,namely 80, and does not rely on the actual size of the terminal window.However,note,that I have not tested the following code in conjunction with phutil,only tested the code stated in my comment above.
Sep 21 2015
Here is the code snippet for Unix/Linux:
In the code the unix Command tput cols is used. All this really does is look at the $TERM environment variable and infers the column count from that. On my Mint 17.2 this is 'xterm' and the tput cols command always returns 80 (which is the default column width for xterm).
Sep 20 2015
preg_match('/CON.*:(\n[^|]+?){3}(?<cols>\d+)/', `mode`, $matches); $cols = $matches['cols'];
This outputs the number of columns of the terminal window according to http://stackoverflow.com/questions/263890/how-do-i-find-the-width-height-of-a-terminal-window (it's a weird trick),so I assume the width can be concluded in some way from the number of columns. Tested it ,but however when resizing the window by mouse the number of columns stays the same,don't know whether this behaves exactly as the non-Windows implementation.
Sep 19 2015
Thanks for the response. I have similar concerns about security and using Composer in my own personal projects.
Perhaps similar logic to bower could be leveraged (which I think is more security conscious).
I'd hate to have to reinvent the wheel for library dependencies.
Sep 18 2015
Forgive my ignorance, but isn't this what Composer does?
Sep 6 2015
Aug 30 2015
Aug 29 2015
Aug 22 2015
Aug 20 2015
After a few try seems to works ..
I want to work on this eventually but I haven't had the time.
@joshuaspence Did your stab draw blood?
Jul 23 2015
Jul 21 2015
Looking at https://phabricator.marc-richter.info it is an RSA based cert so nevermind.
Let me ask something, since I get a similar issue.
What type of crypto your self-signed cert is using ??
Jul 14 2015
Jul 12 2015
Of course, I understand that the solution needs to be done properly in order to not break for others. I like the implementation in the diff you mentioned - it is not pretty but at least we contain the "hacks" in one place for the different environments. And who knows - maybe Windows 10 will give us a proper bash to use so that these problems will be long gone.
The problem is that escaping commands on Windows is thoroughly broken; there is no one solution that will work universally for everyone. Fixing this issue by changing the escaping so that it works under Command Prompt may well break it under msysGit, and it's important to understand in what situations the error occurs so that we don't cause regressions for anyone else.
In T8821#125999, @hach-que wrote:Can you try running Arcanist commands under msysGit?
Can you try running Arcanist commands under msysGit?
In T8821#125997, @hach-que wrote:We used the above script to install Arcanist this Friday (2 days ago). If you are running a version near that date or before it, then it's definitely an environment issue as the script works fine.
The only real issue with this approach is that there is a limit to the PATH environment string so what I had to do was to shorten all my entries by converting everything to DOS paths.
This is somewhat concerning; I have no idea what effect this will have.
I do not run msysGit Bash
You'll need Git installed for even the most basic of Arcanist commands to work (how did you clone Arcanist / libphutil without having Git installed?)
We used the above script to install Arcanist this Friday (2 days ago). If you are running a version near that date or before it, then it's definitely an environment issue as the script works fine.
In T8821#125993, @hach-que wrote:I don't understand where these issues are coming from; we have several developers that use the latest version of Arcanist and libphutil on Windows without issue.
I think what needs to be established:
- How did you install PHP?
- What version of PHP are you using?
- Does Arcanist work fine under msysGit Bash?
- Does Arcanist work fine under Windows Command Prompt?
- Does Arcanist work fine under Windows PowerShell?
- What value do you have for system-wide PATH?
- Is both arc.bat and php.exe in your system-wide PATH?
For reference, this is the Powershell script we use to install Arcanist on developer machines (replace the URL https://code.redpointsoftware.com.au/ with your own instance). On a fresh install of Windows (or an install of Windows that does not have PHP or Arcanist installed), run this under an Administrator Powershell prompt and restart the computer.
I don't understand where these issues are coming from; we have several developers that use the latest version of Arcanist and libphutil on Windows without issue.
Jul 10 2015
Jul 7 2015
Jun 16 2015
Jun 15 2015
Jun 14 2015
Jun 13 2015
Jun 11 2015
Jun 10 2015
Jun 5 2015
May 28 2015
May 23 2015
I might take a stab at this.
May 19 2015
I think there's a point at which your parsing JavaScript instead of JSON...
Seems weird, primarily due to lack of standardization. Would // and # both work? Or only one of them? The decision winds up being kind of arbitrary.
This has come up for discussion before, although I can't remember when/where. Generally, I'm onboard with it.
May 18 2015
I haven't actually done anything on this.
May 14 2015
I had added code to implement this feature to arcanist and libphutil and is working. How can I contribute to have this feature added to code base?
May 12 2015
May 4 2015
May 3 2015
Apr 27 2015
Apr 7 2015
Apr 6 2015
We haven't seen other interest in this and don't plan to pursue it in the near term. I believe deployment of client SSL certificates is exceptionally rare in the wild. Running Conduit over SSH (T550) might solve some of the same problems but has far broader acceptance.
Mar 30 2015
I assume that was handled by the password envelope
In T7692#104265, @epriestley wrote:In some setups, your patch allows any attacker to log in to any LDAP account by just not typing a password.
I assume my patch does not change current behaviour for others
In my authentication module I have e.g. this code for my PhutilAuthAdapter:
public function getAccountRealName() { $username = explode("@", $this->getAccountID(), 2)[0]; $provider = PhabricatorLDAPAuthProvider::getLDAPProvider();
It is expected that this block will handle the case you describe, note the comment about rebinding with anonymous credentials and the actual rebind lower down.
Mar 18 2015
Mar 15 2015
Support for streaming files (vs fire-and-forget requests) -- which I think was discussed somewhere -- is no longer very important after T7149. We can now store files of arbitrary size in engines that only expose the existing writeEntireFile($big_chunk_of_data) API without major downsides.