Merge branch 'devops18_liyuchun' into 'devops18'
* Fix bug #18088. See merge request easycorp/zentaopms!1224
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ $filter->rules->orderBy = '/^\w+_(desc|asc)$/i';
|
||||
$filter->rules->browseType = '/^by\w+$/i';
|
||||
$filter->rules->word = '/^\w+$/';
|
||||
$filter->rules->paramName = '/^[a-zA-Z0-9_\.]+$/';
|
||||
$filter->rules->paramValue = '/^[a-zA-Z0-9=_,`#+\^\/\.%\|\x7f-\xff\-]+$/';
|
||||
$filter->rules->paramValue = '/^[a-zA-Z0-9=_,`#+\^\/\.%\*\|\x7f-\xff\-]+$/';
|
||||
|
||||
$filter->default = new stdclass();
|
||||
$filter->default->moduleName = 'code';
|
||||
|
||||
+12
-10
@@ -845,7 +845,9 @@ class gitlab extends control
|
||||
*/
|
||||
public function createBranchPriv($gitlabID, $projectID, $branch = '')
|
||||
{
|
||||
if($branch) $branch = helper::safe64Decode($branch);
|
||||
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
|
||||
if($branch) $branch = str_replace('*', '-', $branch);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createBranchPriv($gitlabID, $projectID, $branch);
|
||||
@@ -921,7 +923,8 @@ class gitlab extends control
|
||||
die(js::confirm($this->lang->gitlab->branch->confirmDelete , inlink('deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch&confirm=yes")));
|
||||
}
|
||||
|
||||
$branch = helper::safe64Decode($branch);
|
||||
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
|
||||
$branch = str_replace('*', '-', $branch);
|
||||
$reponse = $this->gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
|
||||
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
|
||||
@@ -1096,7 +1099,8 @@ class gitlab extends control
|
||||
*/
|
||||
public function editTagPriv($gitlabID, $projectID, $tag = '')
|
||||
{
|
||||
$tag = helper::safe64Decode($tag);
|
||||
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
|
||||
$tag = str_replace('*', '-', $tag);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
@@ -1128,7 +1132,8 @@ class gitlab extends control
|
||||
*/
|
||||
public function deleteTagPriv($gitlabID, $projectID, $tag)
|
||||
{
|
||||
$tag = helper::safe64Decode($tag);
|
||||
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
|
||||
$tag = str_replace('*', '-', $tag);
|
||||
$reponse = $this->gitlab->apiDeleteTagPriv($gitlabID, $projectID, $tag);
|
||||
|
||||
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
|
||||
@@ -1537,13 +1542,10 @@ class gitlab extends control
|
||||
*/
|
||||
public function deleteTag($gitlabID, $projectID, $tagName = '', $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes')
|
||||
{
|
||||
$tagName = urlencode($tagName);
|
||||
die(js::confirm($this->lang->gitlab->tag->confirmDelete , inlink('deleteTag', "gitlabID=$gitlabID&projectID=$projectID&tagName=$tagName&confirm=yes")));
|
||||
}
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->tag->confirmDelete , inlink('deleteTag', "gitlabID=$gitlabID&projectID=$projectID&tagName=$tagName&confirm=yes")));
|
||||
|
||||
$tagName = helper::safe64Decode($tagName);
|
||||
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
|
||||
$tagName = str_replace('*', '-', $tagName);
|
||||
$reponse = $this->gitlab->apiDeleteTag($gitlabID, $projectID, $tagName);
|
||||
|
||||
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
|
||||
|
||||
@@ -62,8 +62,10 @@
|
||||
<td class='text' title="<?php echo $levelLang[$branch->push_access_level];?>"><?php echo $levelLang[$branch->push_access_level];?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
if(common::hasPriv('gitlab', 'editBranchPriv')) common::printLink('gitlab', 'editBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=" . urlencode(helper::safe64Encode($branch->name)), "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editBranchPriv} class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'deleteBranchPriv')) echo html::a($this->createLink('gitlab', 'deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=" . urlencode(helper::safe64Encode($branch->name))), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteBranchPriv}' class='btn'");
|
||||
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
|
||||
$branchName = str_replace('-', '*', $branch->name);
|
||||
if(common::hasPriv('gitlab', 'editBranchPriv')) common::printLink('gitlab', 'editBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branchName", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editBranchPriv} class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'deleteBranchPriv')) echo html::a($this->createLink('gitlab', 'deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branchName"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteBranchPriv}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -67,8 +67,10 @@
|
||||
<td class='text'><?php echo $gitlabTag->updated?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
|
||||
$tagName = str_replace('-', '*', $gitlabTag->name);
|
||||
$isDisabled = $gitlabTag->protected ? 'disabled' : '';
|
||||
common::printLink('gitlab', 'deleteTag', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=" . urlencode(helper::safe64Encode($gitlabTag->name)), "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTag}' class='btn btn-primary' target='hiddenwin' $isDisabled");
|
||||
common::printLink('gitlab', 'deleteTag', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=$tagName", "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTag}' class='btn btn-primary' target='hiddenwin' $isDisabled");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -63,8 +63,10 @@
|
||||
<td class='text'><?php echo zget($lang->gitlab->branch->branchCreationLevelList, $gitlabTag->accessLevel);?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
common::printLink('gitlab', 'editTagPriv', "gitlabID=$gitlabID&projectID=$projectID&tag_name=" . urlencode(helper::safe64Encode($gitlabTag->name)), "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editTagPriv} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'deleteTagPriv', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=" . urlencode(helper::safe64Encode($gitlabTag->name)), "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTagPriv}' class='btn btn-primary' target='hiddenwin' onclick='if(confirm(\"{$lang->gitlab->tag->protectConfirmDel}\")==false) return false;'");
|
||||
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
|
||||
$tagName = str_replace('-', '*', $gitlabTag->name);
|
||||
common::printLink('gitlab', 'editTagPriv', "gitlabID=$gitlabID&projectID=$projectID&tag_name=$tagName", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editTagPriv} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'deleteTagPriv', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=$tagName", "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTagPriv}' class='btn btn-primary' target='hiddenwin' onclick='if(confirm(\"{$lang->gitlab->tag->protectConfirmDel}\")==false) return false;'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user